--:--









Quiz for HAVING Clause

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



Logo

Q1: Which clause is used to filter records after aggregation in SQL?

Logo

Q2: Which clause is used to filter records after GROUP BY is applied?

Logo

Q3: Which of the following is valid in a SQL statement?

Logo

Q4: Can we use aggregate functions in the HAVING clause?

Logo

Q5: What will this query return: SELECT dept, COUNT(*) FROM emp GROUP BY dept HAVING COUNT(*) > 5?

Logo

Q6: What happens if we use HAVING without GROUP BY?

Logo

Q7: Which of the following is NOT allowed in a HAVING clause?

Logo

Q8: HAVING is typically used with which SQL clause?

Logo

Q9: In what scenario would you use HAVING instead of WHERE?

Logo

Q10: Which is a correct SQL statement using HAVING?

Logo

Q11: HAVING clause filters which type of data?

Logo

Q12: Can we use HAVING clause with multiple conditions?

Logo

Q13: Which query returns groups where SUM(salary) is more than 50000?

Logo

Q14: HAVING clause is used with which clause to perform filtering?

Logo

Q15: Choose the correct SQL syntax using HAVING.

Logo

Q16: Which keyword cannot be used inside HAVING clause?

Logo

Q17: HAVING clause comes after which clause in SQL?

Logo

Q18: Which clause is used for row-level filtering?

Logo

Q19: Can HAVING be used in SELECT without aggregation?

Logo

Q20: What is the output of: SELECT dept, SUM(salary) FROM emp GROUP BY dept HAVING SUM(salary) > 100000?

Logo

Q21: Which clause should be used to restrict groups in SQL?

Are you ready to start test? Set your time limit