Unit 1, lesson 2 · AS, LIMIT
Renaming columns with AS, previewing with LIMIT
Tidy column names
AS gives a column a new name in your result, which makes reports easier to read. LIMIT caps how many rows come back, so you can preview a big table without pulling all of it.
SELECT name AS product,
price AS list_price
FROM products
LIMIT 3;Your task
A report needs every customer's name and city, but with clearer headings. Return both columns, renamed to customer and home_city.
Tables you will use: customers
Try it in your browserFree, no sign-up. Your query is checked as you go.