Loading

Quipoin Menu

Learn • Practice • Grow

sql / SQL GROUP BY
mcq
Direction: Choose the correct option

Q1.

SELECT department, COUNT(*) FROM employees GROUP BY department;
What does this query do?
A. Counts departments
B. Lists departments only
C. Counts employees per department
D. Counts all employees
Direction: Choose the correct option

Q2.

SELECT department, AVG(salary) FROM employees GROUP BY department;
What information is returned?
A. Average salary overall
B. Department names only
C. Average salary per employee
D. Each department with its average salary
Direction: Choose the correct option

Q3.

SELECT department, SUM(salary) FROM employees GROUP BY department;
What does SUM(salary) represent here?
A. Salary per employee
B. Total salary per department
C. Average per department
D. Total company salary
Direction: Choose the correct option

Q4.

SELECT department, MAX(salary) FROM employees GROUP BY department;
What does this show?
A. Department names
B. Lowest salary
C. Highest salary overall
D. Highest salary in each department
Direction: Choose the correct option

Q5.

SELECT department, job_title, COUNT(*) FROM employees GROUP BY department, job_title;
How many grouping levels are there?
A. No grouping
B. Two levels
C. Three levels
D. One level