Ctr

Shop the Sales

We're back to working on our e-commerce website, "Wamazon." Remember the merchandise table with our things for sale.


merchandise
column_name type
id
INTEGER
name
VARCHAR
price_usd
NUMERIC
discount_perc
NUMERIC

We already learned how to apply a discount to apply a sale price. Now that we know how to use ORDER BY, let's try ordering on a computed column. Just put the computation after the ORDER BY instead of just the column name.

For this challenge, select the cheapest 10 items based on their sale price after applying the discount.

© 2022 Andrew Carlson. All rights reserved.

name
VARCHAR
sale_price
NUMERIC
1
Licensed Plastic Gloves
9.35
2
Licensed Frozen Bike
10.00
3
Tasty Rubber Shoes
11.89
4
Modern Bronze Computer
15.00
5
Sleek Rubber Shirt
15.75
6
Intelligent Fresh Shirt
26.40
7
Modern Soft Shirt
27.50
8
Sleek Soft Soap
37.79
9
Awesome Metal Sausages
39.50
10
Awesome Bronze Chicken
47.95
10 rows

You haven't solved this challenge yet!
Are you sure you want to reveal the answer?