For timestamps, descending order (DESC) puts the latest time first. Put the WHERE condition before ORDER BY.
SELECT id FROM deployments
WHERE status = 'running'
ORDER BY started_at ASC;Show id and started_at for staging deployments. Sort by start time, newest first.