In the table below, how do I get just the most recent record of id=1
based on the signin column and not all 3 records?
+----+---------------------+---------+
| id | signin | signout |
+----+---------------------+---------+
| 1 | 2011-12-12 09:27:24 | NULL |
| 1 | 2011-12-13 09:27:31 | NULL |
| 1 | 2011-12-14 09:27:34 | NULL |
| 2 | 2011-12-14 09:28:21 | NULL |
+----+---------------------+---------+
Building on @xQbert's answer's, you can avoid the subquery AND make it generic enough to filter by any ID