Oh, someone should fix that... I guess it won't let you put a group statement in the 
where clause.

Here is another way.  On the down side, its a bit more roundabout.  On the up side, 
however, I actually tried it and it worked.

select col1 from t1 order by col2 desc limit 1;

-Philip


On Sun, 12 May 2002 23:41:05 +0200
Sabine Richter <[EMAIL PROTECTED]> wrote:

> Hello Philip,
> 
> that was my first choice, too. 
> But no, error 1111: Invalid use of group function
> 
> and select col1, max(col2) from table;
> is error 1140: mixing of group cols with non groupü cols is illegal
> (That would other sql backends say too)
> 
> and other variants of the above like "select col1 from table t1, table
> t2 where ....=max(col2)" result in the same error reports
> 
> Perhaps someone else has an idea?
> 
> Best regards
> Sabine 
> 

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to