Select customer columns

Return customer_id and name from every row in customers, in that column order. Keep duplicate names. Row order does not matter.

Difficulty: beginner

Show hint

Use SELECT to choose the two requested columns from customers.

Tables and sample data

Each test starts with fresh tables. Result rows may be returned in any order. Column names and column order must match.

Sample data: customers
customer_id (integer)name (text)city (text)
1AshaKathmandu
2BenLondon
3ChenSingapore
Expected sample result
customer_idname
1Asha
2Ben
3Chen

Your solution

SQL · PostgreSQL

Results

PostgreSQL loads when you Run or Submit. Write one read-only SELECT or WITH query. Your query runs in this browser.

Back to Lesson