Thanks all the info.
Just got what I wanted.
2009/9/10 Wolfgang Schaefer :
> 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
Hello,
sorry I'm not good at SQL statement.
I have a table, whose stru is like:
idvalue
1 33
2 987
3 10
4 22
...
I want to get the max value and the corresponding id, using this sql:
select max(value),id from table;
but it won't work.
so what's the