The management of EasyShop would like to classify the items as cheap, affordable, expensive and very expensive. The classification is done if item unit price is between 0 and 499 then 'Cheap', if between 500 and 1999 then 'Affordable', if between 2000 and 4999 then 'Expensive' and if price is more than or equal to 5000 then 'Very Expensive'. Write a query to display the itemtype and classification of items. Display unique rows sorted by itemtype and classification in ascending order.
This is my query
SELECT DISTINCT ItemType,
CASE
Price BETWEEN 0 AND 499 THEN 'Cheap'
Price BETWEEN 500 AND 1999 THEN 'Affordable'
Price BETWEEN 2000 AND 4999 THEN 'Expensive'
Price >=5000 THEN 'Very Expensive'
END Classification
FROM Item