D
Dave
I have two queries that I can't seem to join together the way I need it to
(did left join on date & miles). One query is grouping/averaging/totaling.
And the other has the general info. I am working on a transport db that
groups by date and beginning mileage and calculates the total charge for that
run, but still shows each person with general info. It is creating duplicate
totals. This is what it is doing:
Name Date Start Miles From To Avg Time Avg Miles Totals
John Doe 03/03/08 98000 here there 1 60 $100.00
Mike Who 03/03/08 98000 here there 1 60 $100.00
Me Too 03/03/08 98000 here there 1 60 $100.00
James Bro 03/03/08 98500 here there 0.5 30 $50.00
John Doe 03/04/08 99000 here there 1.5 80 $150.00
Me Too 03/04/08 99000 here there 1.5 80 $150.00
Jones Ink 03/05/08 99200 here there 0.25 20 $50.00
Tina Tang 03/06/08 99201 here there 1 55 $110.00
This is what I need it to do:
Name Date Start Miles From To Avg Time Avg Miles Totals
John Doe 03/03/08 98000 here there 1 60 $100.00
Mike Who 03/03/08 98000 here there
Me Too 03/03/08 98000 here there
James Bro 03/03/08 98500 here there 0.5 30 $50.00
John Doe 03/04/08 99000 here there 1.5 80 $150.00
Me Too 03/04/08 99000 here there
Jones Ink 03/05/08 99200 here there 0.25 20 $50.00
Tina Tang 03/06/08 99201 here there 1 55 $110.00
Thank you in advance.
(did left join on date & miles). One query is grouping/averaging/totaling.
And the other has the general info. I am working on a transport db that
groups by date and beginning mileage and calculates the total charge for that
run, but still shows each person with general info. It is creating duplicate
totals. This is what it is doing:
Name Date Start Miles From To Avg Time Avg Miles Totals
John Doe 03/03/08 98000 here there 1 60 $100.00
Mike Who 03/03/08 98000 here there 1 60 $100.00
Me Too 03/03/08 98000 here there 1 60 $100.00
James Bro 03/03/08 98500 here there 0.5 30 $50.00
John Doe 03/04/08 99000 here there 1.5 80 $150.00
Me Too 03/04/08 99000 here there 1.5 80 $150.00
Jones Ink 03/05/08 99200 here there 0.25 20 $50.00
Tina Tang 03/06/08 99201 here there 1 55 $110.00
This is what I need it to do:
Name Date Start Miles From To Avg Time Avg Miles Totals
John Doe 03/03/08 98000 here there 1 60 $100.00
Mike Who 03/03/08 98000 here there
Me Too 03/03/08 98000 here there
James Bro 03/03/08 98500 here there 0.5 30 $50.00
John Doe 03/04/08 99000 here there 1.5 80 $150.00
Me Too 03/04/08 99000 here there
Jones Ink 03/05/08 99200 here there 0.25 20 $50.00
Tina Tang 03/06/08 99201 here there 1 55 $110.00
Thank you in advance.