Welcome to your SQL Exam

What does this query return? 2 Marks

Which SQL function is used for ranking rows? 2 Marks

The default sorting order of ORDER BY is:

What extra information does WITH ROLLUP provide?

What does this query fetch? 3 Marks

Which of these is not a SQL data type?

What is the purpose of DISTINCT here? 2 Marks

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

What will COUNT(*) return?

Which statement about window functions is incorrect? 2 Marks

Which clause is used to sort the result-set?

A subquery inside a WHERE clause is called:

What will this return? 2 Marks

What is the role of HAVING here? 2 Marks

What does the EXPLAIN command do in SQL? 2 Marks

What will this query return? 3 Marks

What is the output of this query? 3 Marks

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

What will be the final result? 3 Marks

Why is EXPLAIN used here? 2 Marks

What does this query return? 3 Marks

What does this query do? 3 Marks

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

What does the DISTINCT keyword do?

What does this query return? 2 Marks

What is the purpose of COMMIT in SQL?

What does HAVING do in SQL?

What does this query produce? 2 Marks

What does this query return?