--:--









Quiz for GROUP BY

Course: SQL | Subject: SQL | Topic: Grouping and Filtering



Logo

Q1: What does the GROUP BY clause do in SQL?

Logo

Q2: Which of the following is a valid use of GROUP BY?

Logo

Q3: Which clause is often used with GROUP BY?

Logo

Q4: Which aggregate function is commonly used with GROUP BY?

Logo

Q5: Can you use GROUP BY with multiple columns?

Logo

Q6: What happens if you omit a non-aggregated column from the GROUP BY clause?

Logo

Q7: Which clause determines the grouping behavior in SQL?

Logo

Q8: Which aggregate function returns the maximum value in a group?

Logo

Q9: What does the following SQL return? SELECT department, COUNT(*) FROM employees GROUP BY department;

Logo

Q10: What is the purpose of the HAVING clause in conjunction with GROUP BY?

Logo

Q11: Which SQL keyword is used to filter rows before grouping?

Logo

Q12: What will SELECT city, COUNT(*) FROM customers GROUP BY city; return?

Logo

Q13: Which of these is invalid in a GROUP BY clause?

Logo

Q14: What will SELECT product_id, SUM(quantity) FROM sales GROUP BY product_id; return?

Logo

Q15: Is ORDER BY mandatory when using GROUP BY?

Logo

Q16: What happens if a column in SELECT is not part of GROUP BY or an aggregate function?

Logo

Q17: Which clause is evaluated first in a SQL query with GROUP BY?

Logo

Q18: Can you use GROUP BY with JOINs?

Logo

Q19: How does GROUP BY affect NULL values?

Logo

Q20: Which keyword is used to filter grouped rows in SQL?

Are you ready to start test? Set your time limit