Forum Moderators: coopster

Message Too Old, No Replies

group by problem

         

bagheera

3:35 pm on Mar 17, 2004 (gmt 0)

10+ Year Member



how can i get this running in a singe query:

SELECT max(met.meeting_date), met.ref_num
FROM meetings met
WHERE max(met.meeting_date) < (date_sub( curdate( ) , interval 90 day))
GROUP BY met.ref_num

I get the following error:

'Invalid use of group function'

It doesnt like the WHERE max(met.meeting_date)... statement. The problem is that I cant get the meeting_date within the group by. It works when I delete the WERE criteria...

Im just stuck on this!

thanks,

bagheera

3:41 pm on Mar 17, 2004 (gmt 0)

10+ Year Member



I needed to use HAVING...! instead so this ones figured out