Courses
SQL Intermediate: Queries That Survive Real Data
Check Yourself: Schema Design That Holds
Five scenario questions on normal forms, price snapshots, composite UNIQUE, CHECK and ON DELETE. If you miss more than one, reread the lessons in this section.
Course content
Join this Course
Sign in to save your progress.
-
Joins Beyond the Basics
-
Three-Table Joins Without Double Counting
-
Subqueries, EXISTS and IN: Which One When
-
-
-
Thinking in Sets
-
CTEs: Break a Long Query Into Named Steps
-
UNION, INTERSECT and EXCEPT
-
-
-
Windows and Dates
-
Window Functions: ROW_NUMBER, RANK and Running Totals
-
Dates, Times and Time Zones in PostgreSQL
-
-
-
Schema Design That Holds
-
Normalization: Where to Split and Where to Stop
-
UNIQUE, CHECK and Foreign Key Actions
-
-
-
Indexes and Transactions
-
Indexes and EXPLAIN: Why That Query Is Slow
-
Transactions and What Two Users Can See
-
-
- Final Check: SQL Intermediate
1.
A sales table stores the products of each sale in one text column, separated by commas. What is the main problem?
2.
A discount_percent column has CHECK (discount_percent BETWEEN 1 AND 90). An INSERT with a NULL discount succeeds. Why?
3.
An order from August shows a higher total after the product price changes in October. What change to the design fixes that?
4.
A table has UNIQUE (code, region), and two rows are inserted with the same code and a NULL region. What happens?
5.
Support tickets must stay in the database when a customer is deleted, with no customer attached. Which foreign key action fits?
About
Five scenario questions on normal forms, price snapshots, composite UNIQUE, CHECK and ON DELETE. If you miss more than one, reread the lessons in this section.
- Duration
- 5 min
- Last update
- 10/01/2026
Was this helpful?
0
0
Comments (0)
Sign in to commentNo comments yet.