In MySQL, we can use aggregate functions like "COUNT", "SUM", and "AVG" to perform calculations on sets of rows.
The COUNT function is used to count the number of rows that meet a specified condition.
SELECT COUNT(*) AS total_products FROM products WHERE category = 'GAMES';
The SUM function is used to calculate the sum of values in a numeric column.
SELECT SUM(product_price) AS Total_Products_Price FROM products;
The AVG function is used to calculate the average of values in a numeric column.
SELECT AVG(price) AS average_price FROM products WHERE category = 'GAMES';
-- Total number of products SELECT COUNT(*) AS total_products FROM products; -- Total salary of all products SELECT SUM(price) AS total_price FROM products; -- Average salary of all products SELECT AVG(price) AS average_price FROM products;