Home / SQL / Reading data

ORDER BY

ORDER BY sorts the result. Add DESC for largest first. It usually comes after where. To summarize rows instead, see GROUP BY.

SELECT name, age
FROM customers
ORDER BY age DESC;

Test yourself on this