M
Marty
I’m having the simplest query problem but for the life of me I cannot not
figure it out. I have a table it looks like this:
Name Date Price Location
Smith 03/03/05 12.00 Dallas
Smith 03/04/05 13.00 Dallas
Smith 03/05/05 12.00 Dallas
Smith 03/06/05 14.00 Dallas
Jones 03/03/05 12.00 Ft. Worth
Jones 03/04/05 14.00 Ft. Worth
Jones 03/05/05 12.00 Ft. Worth
Jones 03/06/05 12.00 Ft. Worth
I want to do a Group by Name, Date, Max(Price), Location. The results of the
Query I want would look like this:
Smith 03/06/05 14.00 Dallas
Jones 03/04/05 14.00 Ft. Worth
What keeps happening to me is: I can do a query that will Group by Name and
Max(Price) and I get:
Smith 14.00
Jones 14.00
But if I add any other field – say – Date then I get an output that looks
like this:
Smith 03/03/05 12.00
Smith 03/04/05 13.00
Smith 03/05/05 12.00
Smith 03/06/05 14.00
Jones 03/03/05 12.00
Jones 03/04/05 14.00
Jones 03/05/05 12.00
Jones 03/06/05 12.00
…meaning everything. I’m at the point I want to scream! I cannot not
believe I can’t figure this out. Can anyone help?
Marty
figure it out. I have a table it looks like this:
Name Date Price Location
Smith 03/03/05 12.00 Dallas
Smith 03/04/05 13.00 Dallas
Smith 03/05/05 12.00 Dallas
Smith 03/06/05 14.00 Dallas
Jones 03/03/05 12.00 Ft. Worth
Jones 03/04/05 14.00 Ft. Worth
Jones 03/05/05 12.00 Ft. Worth
Jones 03/06/05 12.00 Ft. Worth
I want to do a Group by Name, Date, Max(Price), Location. The results of the
Query I want would look like this:
Smith 03/06/05 14.00 Dallas
Jones 03/04/05 14.00 Ft. Worth
What keeps happening to me is: I can do a query that will Group by Name and
Max(Price) and I get:
Smith 14.00
Jones 14.00
But if I add any other field – say – Date then I get an output that looks
like this:
Smith 03/03/05 12.00
Smith 03/04/05 13.00
Smith 03/05/05 12.00
Smith 03/06/05 14.00
Jones 03/03/05 12.00
Jones 03/04/05 14.00
Jones 03/05/05 12.00
Jones 03/06/05 12.00
…meaning everything. I’m at the point I want to scream! I cannot not
believe I can’t figure this out. Can anyone help?
Marty