Home / SQL / Practice problems / Easy

Customers in Australia

Easyrow order matters

Show the name and city of customers in Australia, in alphabetical order of name.

Tables: customers(customer_id, name, city, country, joined) · products(product_id, name, category, price) · orders(order_id, customer_id, order_date, status) · order_items(order_id, product_id, quantity, unit_price)

Your query
Show the expected result
namecity
Anjali KarkiSydney
Bikash ThapaBrisbane
Ethan NguyenBrisbane
Grace LeeMelbourne
Kiran RaiBrisbane
Liam WalkerSydney
Lucas MartinMelbourne
Mia ChenBrisbane
Noah BrownBrisbane
Olivia SmithNULL
Sita GurungBrisbane
Zoe ClarkeMelbourne

12 rows

Show a solution
SELECT name, city FROM customers WHERE country = 'Australia' ORDER BY name;

SQL used

New to SQL? The free SQL course teaches everything these problems use, with a self-checking exercise in every lesson.