Complete the code to select the total price by multiplying quantity and price_per_unit.
SELECT quantity * [1] AS total_price FROM orders;The column price_per_unit holds the price for one unit. Multiplying it by quantity gives the total price.
Complete the code to calculate the discounted price by subtracting discount from price.
SELECT price - [1] AS discounted_price FROM products;The discount column holds the amount to subtract from the price to get the discounted price.
Fix the error in the code to calculate the total cost including tax.
SELECT price + price * [1] AS total_cost FROM sales;The tax_rate column holds the tax percentage to add to the price for the total cost.
Fill both blanks to calculate the final price after applying discount and adding tax.
SELECT price - [1] + price * [2] AS final_price FROM invoices;
First, subtract the discount from the price, then add the tax calculated by multiplying price by tax_rate.
Fill all three blanks to select the product name, calculate total revenue, and filter for revenue greater than 1000.
SELECT product_name, quantity * [1] AS total_revenue FROM sales WHERE quantity * [2] [3] 1000;
Multiply quantity by price_per_unit to get total revenue. Filter rows where total revenue is greater than 1000 using the '>' operator.