I would like to work out a salespersons personal best GP total (£) and store it in a field in a table - is that possible?
I know that the following query SQL brings back the highest GP for a person but I cant get that to work within a table (probably because I dont really know where to put it!)
SELECT First(CommHistory.TotalGP) AS BestGP, CommHistory.SAlesPersonID FROM CommHistory GROUP BY SalesPersonID ORDER BY First(CommHistory.TotalGP), CommHistory.SalesPersonID;
I know that the following query SQL brings back the highest GP for a person but I cant get that to work within a table (probably because I dont really know where to put it!)
SELECT First(CommHistory.TotalGP) AS BestGP, CommHistory.SAlesPersonID FROM CommHistory GROUP BY SalesPersonID ORDER BY First(CommHistory.TotalGP), CommHistory.SalesPersonID;