Add ORDER BY after FROM to choose the order of the result. ASC means ascending. SQL uses it by default when you leave out the direction. Without ORDER BY, the order of the rows is unspecified.
SELECT id FROM deployments ORDER BY id DESC;Show id and service for every deployment, with the smallest ID first.