all problems

Filter customers by country

sqleasyWHEREORDER BY

Return the id and name of every customer from the UK, sorted by name (A-Z).

hint ladder

query.sql
loading editor…
step inspector

Write a query with WITH … AS (…) blocks, then inspect each intermediate table before the final SELECT.

output

Run your code to see its output, or check your solution to grade it.

Reference solution

The shape we check against. Compare it with your query: the set of rows matters, the formatting does not.

SELECT id, name FROM customers WHERE country = 'UK' ORDER BY name;

Code is blurred until you solve this problem — the reasoning stays readable.