SQL Aggregate Functions | Database Interview | Skill-Lync Resources
Easy Database Systems SQL Fundamentals

What are aggregate functions in SQL? Give examples.

Answer

Aggregate functions perform calculations on sets of rows and return a single value. Common functions: COUNT (number of rows), SUM (total of numeric column), AVG (average value), MIN (smallest value), MAX (largest value). Used with GROUP BY to calculate aggregates per group. Example: SELECT department, AVG(salary) FROM employees GROUP BY department. COUNT(*) counts all rows; COUNT(column) counts non-null values.

Master These Concepts with IIT Certification
IIT Certified

Master These Concepts with IIT Certification

175+ hours of industry projects. Get placed at Bosch, Tata Motors, L&T and 500+ companies.

Relevant for Roles

Software Engineer Backend Developer Data Analyst