I have this database and want to query the latest dates for only the ID's 5,10,15,20. The result of this query should be only the first four rows of that database.
How would I do that?
You can use in and group by
where (date, myID) in (select max(date), myID
where myID in (5,10,15,20)
group by myID );