Welcome to your SQL Exam

What will this query return? 3 Marks

What is the role of HAVING here? 2 Marks

What does the EXPLAIN command do in SQL? 2 Marks

The default sorting order of ORDER BY is:

What will this return? 2 Marks

What does the DISTINCT keyword do?

What will be the final result? 3 Marks

Which statement about window functions is incorrect? 2 Marks

What is the purpose of DISTINCT here? 2 Marks

Which clause is used to sort the result-set?

Which SQL function is used for ranking rows? 2 Marks

What is the output of this query? 3 Marks

What extra information does WITH ROLLUP provide?

What does this query return? 2 Marks

Which of these is not a SQL data type?

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

What does this query return? 3 Marks

What does this query produce? 2 Marks

What does this query fetch? 3 Marks

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

What is the purpose of COMMIT in SQL?

What does this query return? 2 Marks

A subquery inside a WHERE clause is called:

What will COUNT(*) return?

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

What does this query return?

What does HAVING do in SQL?

What does this query do? 3 Marks

Why is EXPLAIN used here? 2 Marks