Loading

Quipoin Menu

Learn • Practice • Grow

sql / SQL Aggregate
mcq
Direction: Choose the correct option

Q1.

Which SQL function counts the number of rows?
A. COUNT()
B. SUM()
C. AVG()
D. TOTAL()
Direction: Choose the correct option

Q2.

SELECT AVG(salary) FROM employees;
What does AVG() calculate?
A. Average salary
B. Total salary
C. Maximum salary
D. Minimum salary
Direction: Choose the correct option

Q3.

SELECT SUM(salary) FROM employees;
What does this return?
A. Sum of all salaries
B. Maximum salary
C. Number of employees
D. Average salary
Direction: Choose the correct option

Q4.

SELECT MAX(salary), MIN(salary) FROM employees;
What information does this provide?
A. Total salaries
B. Average salary
C. Count of salaries
D. Salary range
Direction: Choose the correct option

Q5.

SELECT COUNT(*) AS total, AVG(salary) AS avg_salary FROM employees;
What does AS do here?
A. Creates table
B. Filters results
C. Sorts the data
D. Names the result columns