Drill 2 of 12 in SQL Basics
0

SQL Basics · SELECT · ORDER BY

2. Customer directory

Concept: SELECT · ORDER BYshow

SELECT picks which columns come back and FROM names the table. ORDER BY sorts the rows: ascending (A→Z, oldest→newest) by default, or add DESC for the reverse.

Example (different data):

SELECT title, price
FROM products
ORDER BY price DESC;

Your task

Sales ops is importing customers into a new CRM and only needs a few fields, oldest accounts first.

Return name, country and signup_date for every customer, sorted by signup_date (oldest first).

Solution unlocks after 3 more tries

Starting Postgres in your browser…

query.sql
Output

Write a query and press Run Query (Ctrl/⌘ + Enter).