sort by date in sql code example
Example 1: sql sort column by date
SELECT timestamp
FROM randomTable
ORDER BY timestamp ASC;
Example 2: sql reverse order of results
SELECT q.*
FROM (SELECT TOP 3 *
FROM table
ORDER BY id DESC) q
ORDER BY q.id ASC