Aggregate function — performs calculation on multiple rows.
Functions:
Example:
1-- Total orders2SELECT COUNT(*) FROM orders;34-- Average order amount5SELECT AVG(amount) FROM orders;67-- Total sales by customer8SELECT customer_id, SUM(amount) as total9FROM orders10GROUP BY customer_id11ORDER BY total DESC;
BA use: