darrenhubbard
Technical User
Hi All,
A quick SUM question. This is a result of a query:
Date From To Type Speed Quantity1 Quantity2
3/1 LDN NY A V 10 1000
4/5 LDN FR C Q 5 10
1/1 LDN NY A V 2000 300
I need to write a query that would output the following from the above:
Date From To Type Speed Q1 Q2 Count
3/1 LDN NY A V 2010 1300 2
4/5 LDN FR C Q 5 10 1
ie the grouping by which to sum by is From, To, Type and Speed. Q1 and Q2 should be ths sums, Count should be the number of records added to get those sums and date should be the most recent date on the record.
My query keeps on producing erros about not including certain things in aggregate queries and it's driving me nuts!
Any help would be much appreciated!
Cheers,
Darren Hubbard
A quick SUM question. This is a result of a query:
Date From To Type Speed Quantity1 Quantity2
3/1 LDN NY A V 10 1000
4/5 LDN FR C Q 5 10
1/1 LDN NY A V 2000 300
I need to write a query that would output the following from the above:
Date From To Type Speed Q1 Q2 Count
3/1 LDN NY A V 2010 1300 2
4/5 LDN FR C Q 5 10 1
ie the grouping by which to sum by is From, To, Type and Speed. Q1 and Q2 should be ths sums, Count should be the number of records added to get those sums and date should be the most recent date on the record.
My query keeps on producing erros about not including certain things in aggregate queries and it's driving me nuts!
Any help would be much appreciated!
Cheers,
Darren Hubbard