Welcome to your SQL Exam

What is the output of this query? 3 Marks

Why is EXPLAIN used here? 2 Marks

What does this query do? 3 Marks

Which clause is used to sort the result-set?

Which of the following is a valid way to create a foreign key?

What does this query fetch? 3 Marks

Which SQL function is used for ranking rows? 2 Marks

What does this query return? 2 Marks

What will COUNT(*) return?

What will this query return? 3 Marks

What will be the final result? 3 Marks

What does this query return? 3 Marks

What is the role of HAVING here? 2 Marks

What does this query return?

What does the EXPLAIN command do in SQL? 2 Marks

A subquery inside a WHERE clause is called:

What does this query return? 2 Marks

What does the DISTINCT keyword do?

Which type of JOIN returns all rows from both tables, even if there is no match?

The default sorting order of ORDER BY is:

What does HAVING do in SQL?

What extra information does WITH ROLLUP provide?

Which SQL statement is used to extract data from a database?

What will this return? 2 Marks

What is the purpose of DISTINCT here? 2 Marks

Which of these is not a SQL data type?

What is the purpose of COMMIT in SQL?

What does this query produce? 2 Marks

Which statement about window functions is incorrect? 2 Marks