SQL Querying Quiz

LuckierEnlightenment7185 avatar
LuckierEnlightenment7185
·
·
Download

Start Quiz

Study Flashcards

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

More Quizzes Like This

Ethical Mindset Quiz
0 questions

Ethical Mindset Quiz

EthicalHeliotrope7625 avatar
EthicalHeliotrope7625
SQL Databases Fundamentals Quiz
11 questions
SQL Sentencias y Cláusulas: JOIN
10 questions
Use Quizgecko on...
Browser
Browser