"Csaba" <[EMAIL PROTECTED]> wrote in
message
news:[EMAIL PROTECTED]
> SELECT * FROM Words
> GROUP BY Id, Lang
> HAVING Rev=Max(Rev)

This wouldn't do what you think it does. HAVING clause applies to the 
whole group, not to individual rows. It determines whether the group 
makes it into final resultset. So this query would pick some random row 
within the group, take Rev from it, and then keep or throw away the 
group based on whether this random Rev just accidentally happens to be 
the largest. The output of this query is unpredictable and, as far as I 
can tell, useless.

Igor Tandetnik 



_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to