Complete the code to calculate the total sales from the sales table.
SELECT [1](amount) FROM sales;The SUM function adds all the values in the amount column to give the total sales.
Complete the code to find how many orders are in the orders table.
SELECT [1](*) FROM orders;The COUNT function counts the number of rows, which tells how many orders there are.
Fix the error in the code to find the average price from the products table.
SELECT [1](price) FROM products;The AVG function calculates the average value of the price column.
Fill both blanks to find the highest and lowest scores from the scores table.
SELECT [1](score), [2](score) FROM scores;
MAX finds the highest score, and MIN finds the lowest score.
Fill all three blanks to create a query that shows each department, the number of employees, and the average salary from the employees table.
SELECT [1], [2](employee_id), [3](salary) FROM employees GROUP BY [1];
This query groups employees by department, counts employees with COUNT, and calculates average salary with AVG.