Following on from this question SELECT the newest record with a non null value in one column
I know have a problem where I have this data
id | keywor
Use:
SELECT t.id, t.keyword, t.count, t.date FROM TABLE t JOIN (SELECT t.keyword, MAX(t.date) 'max_date' FROM TABLE t WHERE t.count IS NOT NULL GROUP BY t.keyword) x ON x.keyword = t.keyword AND x.max_date = t.date