List:General Discussion« Previous MessageNext Message »
From:Claudio Nanni Date:September 10 2009 3:14pm
Subject:Re: how to query this
View as plain text  
This can also help:

select id,value from table order by value desc limit 1;


Cheers

Claudio


2009/9/10 Slackli User <slackliuser@stripped>

> Thanks all the info.
> Just got what I wanted.
>
> 2009/9/10 Wolfgang Schaefer <schaewo@stripped>:
> > John Daisley schrieb:
> >> SELECT MAX(value), id FROM table
> >> GROUP BY id;
> >>
> >>
> >>
> >
> > I guess what Slackli had in mind was more something like this:
> > SELECT id, value
> > FROM table
> > WHERE value = (SELECT max(value) FROM table);
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:
> http://lists.mysql.com/mysql?unsub=1
>
>


-- 
Claudio

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