I want to get the highest value but group by another field on the same table ex:
seqid + fileid + name
1 | 1 | n1 2 | 1 | n2 3 | 2 | n3
SELECT seqid, fileid, name FROM tbl JOIN ( SELECT MAX(seqid) maxSeq, fileid fileid FROM tbl GROUP BY fileid ) tg ON tml.seqid = tg.maxSeq AND tbl.fileid = tg.fileid