Test your foundational knowledge of SQL joins, including INNER and LEFT joins, and key aggregation concepts like GROUP BY and HAVING. This quiz helps reinforce essential SQL techniques for querying and summarizing relational data.
Given two tables 'students' and 'scores', which SQL join returns only the rows where there are matching student IDs in both tables?
Which SQL JOIN will include all rows from the left table and matching rows from the right table, filling with NULLs when no match exists?
Which SQL clause is necessary when you want to aggregate data, for example, finding the total sales per region from a 'sales' table?
If you want to count the number of employees in each department using a 'department' column, which aggregate function do you use?
Which clause is used to filter groups created by the GROUP BY clause, such as keeping only groups where the total is greater than 100?
What value will appear in the joined columns from the right table when a LEFT JOIN finds no matching row?
Which comes first in SQL syntax: the GROUP BY clause or the HAVING clause?
If you want to list only customers who have at least one order in an 'orders' table, which type of join should be used between 'customers' and 'orders'?
Which keyword should be placed between two table names in an SQL statement to perform a LEFT JOIN?
What is the main use of the GROUP BY clause when working with aggregate functions in SQL?