Advanced SQL Joins & Set Operations: Intermediate Concepts
Test your knowledge on advanced SQL join techniques and set operations.
Questions in this quiz
12 questions on Advanced SQL Joins & Set Operations: Intermediate Concepts. Work through them here, then start the quiz to answer them and see your score.
1.Which SQL join would you use to include all records from the left table and the matched records from the right table?
- AINNER JOIN
- BFULL OUTER JOIN
- CLEFT JOIN
- DRIGHT JOIN
2.What is the result of a CROSS JOIN between two tables with 3 and 4 rows respectively?
- A12 rows
- BNone
- C7 rows
- D1 row
3.Which SQL clause is used to combine the results of two SELECT statements?
- AINTERSECT
- BEXCEPT
- CUNION
- DJOIN
4.What does the INTERSECT operation do in SQL?
- AReturns all unique rows from both queries
- BReturns all rows from the first query
- CReturns only rows present in both queries
- DReturns all rows from the second query
5.Which SQL operation would you use to find rows in the first query that are not in the second query?
- AINTERSECT
- BUNION
- CEXCEPT
- DCROSS JOIN
6.What is the primary difference between UNION and UNION ALL?
- AUNION ALL performs a join
- BUNION ALL removes duplicates
- CUNION performs a join
- DUNION removes duplicates
7.Which join type would you use to include all records from both tables, matching where possible?
- ALEFT JOIN
- BFULL OUTER JOIN
- CRIGHT JOIN
- DINNER JOIN
8.In SQL, what does a NATURAL JOIN do?
- APerforms a Cartesian product
- BJoins tables using a specified column
- CJoins tables on all columns with the same name
- DJoins tables without any condition
9.Which SQL keyword is used to specify a condition for joining tables?
- AON
- BHAVING
- CWHERE
- DGROUP BY
10.What is the result of applying a RIGHT JOIN between two tables where the right table has no matching rows in the left table?
- ANo rows returned
- BOnly rows from the left table
- CAll rows from the right table with NULLs for the left table
- DOnly rows from the right table
11.Which SQL operation can be used to remove duplicate rows from a result set?
- AUNION ALL
- BGROUP BY
- CDISTINCT
- DORDER BY
12.What is the purpose of using a SELF JOIN in SQL?
- ATo join a table with itself
- BTo join two different tables
- CTo join tables with no common columns
- DTo perform a Cartesian product