Back to SQL & Relational Databases
Final Assessment

SQL & Relational Databases Final Assessment

Verify your command of SQL querying, NULL safety, table design, JOINs, aggregations, transactions, CTEs, functions, and window functions.

Answered 0 of 15 questionsPass mark: 70%
Question 1

Question 1 of 15

What is the primary purpose of a Primary Key in a database table?

Question 2

Question 2 of 15

In what order does SQL logically evaluate these clauses?

Question 3

Question 3 of 15

How do you correctly check for a missing (NULL) email in a WHERE clause?

Question 4

Question 4 of 15

Which JOIN keeps ALL rows from the left table (courses) even if there are zero matching rows in enrollments?

Question 5

Question 5 of 15

Which clause filters grouped rows AFTER GROUP BY?

Question 6

Question 6 of 15

How is a Many-to-Many relationship cleanly modeled in a relational database?

Question 7

Question 7 of 15

Which SQL block ensures two related updates either BOTH succeed or BOTH undo together?

Question 8

Question 8 of 15

What does COALESCE(phone, 'N/A') return when phone is NULL?

Question 9

Question 9 of 15

Why should you avoid adding database indexes to every single column blindly?

Question 10

Question 10 of 15

What makes a Window Function (ROW_NUMBER() OVER (...)) different from GROUP BY?

Question 11

Question 11 of 15

Why does WHERE total_spent > 100 fail if total_spent is a column alias defined in SELECT?

Question 12

Question 12 of 15

Given tied scores [100, 100, 80], what ranks does DENSE_RANK() assign?

Question 13

Question 13 of 15

Which normalization rule is violated when a table stores 'Keyboard, Mouse' inside a single items cell?

Question 14

Question 14 of 15

What does 5 / 2 evaluate to in SQLite and PostgreSQL integer arithmetic?

Question 15

Question 15 of 15

Which SQL expression safely classifies rows into labeled buckets like 'Premium' vs 'Standard'?

Answer 15 more questions to submit.