List:General Discussion« Previous MessageNext Message »
From:Wolfgang Schaefer Date:September 10 2009 2:11pm
Subject:Re: how to query this
View as plain text  
John Daisley schrieb:
> SELECT MAX(value), id FROM table
> GROUP BY id;
>
> Regards
>
> John Daisley
> Mobile +44(0)7812 451238
> Email john@stripped
>
> Certified MySQL 5 Database Administrator (CMDBA)
> Certified MySQL 5 Developer
> Cognos BI Developer
>
> -----------------------
> Sent from HP IPAQ mobile device.
>
>   

I guess what Slackli had in mind was more something like this:
SELECT id, value
FROM table
WHERE value = (SELECT max(value) FROM table);

cheers,
wolfgang

Thread
how to query thisSlackli User10 Sep
RE: how to query thisJohn Daisley10 Sep
  • Re: how to query thisWolfgang Schaefer10 Sep
    • Re: how to query thisSlackli User10 Sep
      • Re: how to query thisClaudio Nanni10 Sep