Practice: Prices and Labels
Put it together.
Time to practise. Prices of technology books are going up by ten percent. Helen wants to see each technology book, its old price, and its new price, rounded to two decimal places.

- Tech prices up 10%
- Old and new price
- Rounded to two decimals
A price rise
Pause the video, and write the query. You'll need a calculation, round, an alias, and a where test. Here's one solution. Price times one point one, rounded to two places, named new price, for the technology genre.
Show title, price, and price + 10% (rounded) as new_price for Technology books
Show hint
ROUND(price * 1.1, 2) AS new_price
Show solution
SELECT title,
price,
ROUND(price * 1.1, 2) AS new_price
FROM books
WHERE genre = 'Technology';โโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโฌโโโโโโโโโโโโ โ title โ price โ new_price โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโผโโโโโโโโโโโโค โ Python for Curious Minds โ 34.99 โ 38.49 โ โ SQL in a Weekend โ 29.99 โ 32.99 โ โ Data for Everyone โ 31.99 โ 35.19 โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโดโโโโโโโโโโโโ
Quick check
Quick check. A book costs exactly twelve dollars. Using Helen's rule, budget under twelve, standard under twenty, which label does it get? Pause and choose. The answer is B, standard. Twelve is not less than twelve, so the first test fails, and the second one passes.
Summary
You can now calculate, round, rename, and label. Next, the built in functions that clean up text.
Key takeaways- Calculate and round
- Name with AS
- Label with CASE