UPDATESQL

Unit 2, lesson 9 · Unit 2 challenge

Unit 2 review: putting it together

Unit 2 challenge: the sale flyer

This challenge combines IN, IS NOT NULL, a calculated column and sorting. You can sort by a calculated column using the name you gave it with AS.

Example
SELECT name,
       price * 1.08 AS price_with_tax
FROM products
WHERE category = 'Accessories'
ORDER BY price_with_tax DESC;

Your task

Marketing is making a sale flyer for audio and lighting. List every discounted product in the Audio or Lighting categories with its name, price and sale_price (rounded to cents), cheapest sale price first.

Tables you will use: products

Try it in your browserFree, no sign-up. Your query is checked as you go.