I have this table shown below...How do I select only the latest data of the id based on changeno?
+----+--------------+------------+--------+ | id | data | ch
Not a well formed or performance optimized query but for small tasks it works fine.
SELECT * FROM TEST WHERE changeno IN (SELECT MAX(changeno) FROM TEST GROUP BY id)