Label each book budget (<12), standard (<20), or premium (else) by price. Columns: title, price, band.
Label each book budget (<12), standard (<20), or premium (else) by price. Columns: title, price, band.
Answer
SELECT title, price, CASE WHEN price < 12 THEN 'budget' WHEN price < 20 THEN 'standard' ELSE 'premium' END AS band FROM books;