5 Questions
Which query can be used to display the unique promotion costs in each promotion category?
SELECT DISTINCT promo_category, promo_cost FROM promotions ORDER BY promo_category;
Which expression can be used to calculate the total price including surcharge and discount for a product?
unit_price + surcharge - discount
Which query can be used to calculate the difference in days between the expiry date and delivery date for a product?
SELECT product_id, (expiry_date - delivery_date) AS days_difference FROM products;
Which query can be used to display the product name and unit price with a 10% discount included?
SELECT product_name, unit_price * 0.9 AS discounted_price FROM products;
Which query can be used to display the total cost of all promotions in each category?
SELECT promo_category, SUM(promo_cost) AS total_cost FROM promotions GROUP BY promo_category;
Test your SQL skills with this quiz on querying unique promotion costs in different categories from a database table. Find the right queries to display the information you need.
Make Your Own Quizzes and Flashcards
Convert your notes into interactive study material.
Get started for free