SELECT * FROM (SELECT * FROM table_name WHERE id = 1 LIMIT 10) table_alias ORDER BY datetime ASC;