Max of Count and date query

boycie

Registered User.
Local time
Today, 15:01
Joined
Sep 19, 2001
Messages
45
Hi everyone,

I am trying to create a query that will return 1 row as follows;

I have a query with 2 fields: CountofSomething, AccDate

I want to return the max(Countofsomething), AccDate

I am getting the max for each date - I want the max count and the date for that field ie. one row (I am grouping the date field because I do not know what aggregate to use)

Any ideas?

thanks
 
all you can do is find the date that has the max - then use that date to find the count for that date.

you cant get them in a query together.

i find it very strange that you can't use a dmax/dmin etc, and get some other info relating to the max row but you can't - even "expression" doesn't do it, unfortunately - you just get something like a "not part of an aggregate function error", I think
 
Send a some records (data) and tell what you
want as a result.
 
fCountD custaccDate

2 02/05/2003
16 06/05/2003
10 07/05/2003

I want to return:

16 06/05/2003


ie. 16 is the max of that column and I require the date with it

thanks
 
Thanks MStef - that works great

thanks also Dave for your reply
 

Users who are viewing this thread

Back
Top Bottom