@@ -0,0 +1,2 @@ | |||
SELECT product_code, product_name, list_price, discount_percent FROM products; | |||
SELECT product_code, product_name, list_price, discount_percent FROM products ORDER BY list_price DESC; |
@@ -0,0 +1,2 @@ | |||
SELECT CONCAT(last_name, ', ', first_name) AS full_name FROM customers | |||
WHERE last_name REGEXP '^[M-Z]' ORDER BY last_name ASC; |
@@ -0,0 +1 @@ | |||
SELECT product_name, list_price, date_added FROM products WHERE list_price > 500 and list_price < 2000 ORDER BY date_added DESC; |
@@ -0,0 +1,3 @@ | |||
SELECT product_name, list_price, discount_percent, ROUND((list_price * discount_percent / 100),2) AS discount_amount , | |||
ROUND((list_price - (list_price * discount_percent/100)),2) AS discount_price | |||
FROM products ORDER BY (list_price - (list_price*discount_percent/100)) DESC LIMIT 5; |
@@ -0,0 +1,3 @@ | |||
SELECT item_id, item_price, discount_amount, quantity, (item_price*quantity) AS price_total, (discount_amount*quantity) AS discount_total, ((item_price - discount_amount)-quantity) AS item_total | |||
FROM order_items WHERE ((item_price - discount_amount)-quantity) > 500 | |||
ORDER BY item_total DESC; |