Afternoon,
A, hopefully, easy question for a Friday afternoon!
I know you can't use an aggregate and a non-aggregate function in a Query, however is there a workaround which would allow me to do the below?
'Painting the picture'; There is a table with 4 columns. 'SanName', 'AggregateName', 'Used', 'Date'. For simplicity we'll say there are two combinations of these (SAN1 Aggregate1 & SAN1 Aggregate2), so to compare the data between the two dates I have to use the FIRST(), LAST() expressions. When I do this I can't then SELECT 'SanName' or 'AggregateName' due to the 'aggregate and non-aggregate' error.
Is there a way to use the FIRST(), LAST() and SELECT expressions in the same query? So the output would be;
SANName AggregateName FirstAmount LastAmount SAN1 Aggregate1 5000 6000 SAN1 Aggregate2 5000 6000
Any help appreciated
Dr4ke