samedi 7 novembre 2015

sqlite: select all columns where one filed has max value over all columns

I have a table like this:

id int, col1 int, ...

Different rows can have col1 of same value. Now I want to gather all rows where col1 has a the maximum value. e.g. this table values

1 4
2 3
3 4

The query shall give my row 1 and 3

Aucun commentaire:

Enregistrer un commentaire