sql max on a column -


i have table

id  |  sequence | name | status... 1         0       name1   2         1       name1   3         2       name1   4         0       name2   5         0       name3   

the query not take name column such that, select * table status = 'a'

what want max sequence this.

id  |  sequence | name | status.. 3         2       name1   

select * table order sequence desc limit 1

or

select * table sequence=(select max(sequence) table)


Comments