SELECT * FROM ( SELECT * ORDER BY date ASC, time ASC LIMIT 18446744073709551615 ) AS sub GROUP BY sub.name