SQL course · Self-check lesson
SQL Interview Skills Check: Find Your Query Gaps
Use a 15-item SQL skills check and a transparent score map to find which query concepts to study next.
Original PostgreSQL examples · Learn the method, test the output, explain the result.
Core idea
A short check should guide your study, not certify mastery.
Windows → NULLs
Record the error family
The direct answer
Use a small check to choose the next lesson.
A SQL interview skills check is most useful when it tells you which reasoning step failed. Fifteen short items can reveal likely gaps in row filtering, join cardinality, grouping, windows and nulls. They cannot establish full mastery of SQL or predict an employer’s interview result. This page provides a self-scored check with the answer key and a study report you can use immediately; it does not claim to be a live automated diagnostic.
Take the items once without notes, mark your answer against the key, and then solve one new query in each weak area. If you need the concepts first, begin with the fundamentals lesson. The course access block follows this overview.
Course access
Choose your next step in SQL.
Review the current course options and access details here.
Heycademy Courses · Coming Soon
Master SQL with Heycademy
We’re preparing an interactive learning experience with practical exercises, skill assessments and personalized learning to help you build confidence and master new skills.
We’re putting the finishing touches on this course. Please check back for updates.
Before you score
Treat a wrong answer as an instruction.
Allow about 12–15 minutes. Write a short answer for each prompt before reading the answer column. Score one point for a correct answer only when you can explain why it is correct. The result is a snapshot of conceptual recognition, not an assessment of query-writing speed or performance tuning.
The matrix deliberately spreads three items across each skill family. This makes weak spots visible without giving a false impression of precision. If you miss one of three in a family, test a related query. If you miss two or three, review the concept before attempting a timed question. If you get all three, still run an unseen problem before marking the skill secure.
Original 15-item matrix
Answer first, then inspect the key.
| item | skill | prompt |
|---|---|---|
| 1 | Rows | Which clause filters order rows before grouping? |
| 2 | Rows | What does SELECT choose? |
| 3 | Rows | Can WHERE use SUM(amount) at the same query level? |
| 4 | Joins | How many rows result when one customer matches two orders? |
| 5 | Joins | Which join preserves a customer with no order? |
| 6 | Joins | Where should a right-table qualifying condition go if every customer must remain? |
| 7 | Groups | What is one result row after GROUP BY customer_id? |
| 8 | Groups | Does COUNT(column) count nulls? |
| 9 | Groups | Which clause filters groups by SUM(amount)? |
| 10 | Windows | Does ROW_NUMBER retain input rows? |
| 11 | Windows | What does PARTITION BY region reset? |
| 12 | Windows | What extra rule makes ties deterministic for ROW_NUMBER? |
| 13 | Nulls | Does x = NULL identify missing values? |
| 14 | Nulls | Can NOT IN behave unexpectedly if its list contains NULL? |
| 15 | Nulls | What does COUNT(*) count after a LEFT JOIN? |
Open the complete answer key
| item | skill | answer |
|---|---|---|
| 1 | Rows | WHERE |
| 2 | Rows | Output expressions |
| 3 | Rows | No; use HAVING |
| 4 | Joins | Two |
| 5 | Joins | LEFT JOIN |
| 6 | Joins | ON |
| 7 | Groups | One customer group |
| 8 | Groups | No |
| 9 | Groups | HAVING |
| 10 | Windows | Yes |
| 11 | Windows | The window calculation per region |
| 12 | Windows | A tie-break column in ORDER BY |
| 13 | Nulls | No; use IS NULL |
| 14 | Nulls | Yes; result may be unknown |
| 15 | Nulls | Output rows, including preserved rows |
For items 6, 8, 12, 14 and 15, explain the edge case in your own words. A memorised label is less useful than a small data example that makes the behavior visible. The official PostgreSQL pages for joins and groups, windows and NULL-sensitive comparisons document the relevant semantics.
Turn scores into a study report
A transparent recommendation rule.
| Score in a family | Interpretation | Next activity |
|---|---|---|
| 0–1 of 3 | Concept needs a rebuild. | Read the relevant lesson; run its worked example, then change one input row. |
| 2 of 3 | One edge case is not secure. | Identify the missed rule and solve two new variations. |
| 3 of 3 | Recognition is promising, not proof. | Write an unseen query and explain its output before running it. |
Imagine a learner scores Rows 3/3, Joins 1/3, Groups 2/3, Windows 2/3 and Nulls 2/3: total 10/15. The first recommendation is join cardinality, because two of three join ideas were missed. Next review the single error in each other family. After practising the joins lesson, the learner should solve a new customers/orders task, not repeat the same three prompts until they become familiar.
A report should record wrong rule → corrected rule → fresh check. For example: “I put a right-table condition in WHERE; that removed unmatched customers. I will move it into ON when the task requires every left row and verify with a customer who has no qualifying order.”
Keep building this skill
Apply the method on fresh SQL problems.
The course options are above. Return to the synced pricing block whenever you are ready.
What this check cannot tell you
Fifteen items are a starting point.
A three-item family is too small to estimate a stable ability score. The items mostly test concepts, whereas an interview may require writing, debugging and explaining a full query under time pressure. Easy items can be passed by recognition, and one familiar example can hide a fragile rule. Avoid turning 10/15 into a percentage of readiness.
To verify progress, write a query from an unfamiliar prompt, predict the output for a tiny table, and add one edge case. Compare the new result with your first attempt. A true improvement is a corrected method that transfers, not merely a higher score on repeated items.
Choose the next task
Match the gap to the lesson.
Rows or joins: study SELECT, WHERE and LEFT JOIN. Groups: try the joins and aggregation method. Windows: work through row ranking and LAG examples. Nulls: investigate IS NULL, NOT IN and counting. Then use the 14-day study plan to schedule unseen checks. Keep the score sheet private; it is a learning aid, not a hiring credential.
After the answer key
Run one query per weak family.
Recognition questions are only the first pass. If you missed join item 6, create two customers and one paid order, then ask for every customer and any paid order. Write two queries: one with the paid condition in ON and one with it in WHERE. Predict which query preserves the no-order customer. The answer is the ON version when the left row must remain.
If you missed group item 8 or null item 15, run COUNT(*) and COUNT(o.id) after a LEFT JOIN. For an unmatched customer, the first count is 1 and the second is 0. If you missed window item 12, add a tie to the ordering column and ask whether ROW_NUMBER can choose a stable first row. Add a unique tie-break only after deciding the business rule.
| Missed family | Fresh transfer task | Evidence to keep |
|---|---|---|
| Rows | Filter paid orders before grouping. | Expected included order ids. |
| Joins | Preserve a customer with no qualifying order. | Output row count and null columns. |
| Groups | Count matching orders per customer. | COUNT(*) versus COUNT(order_id). |
| Windows | Choose one latest event under a timestamp tie. | Explicit tie-break and chosen event. |
| Nulls | Find records absent from a nullable exclusion list. | NOT IN versus NOT EXISTS output. |
Record a correct explanation, not just a correct label. A query that succeeds on your tiny data but fails when you add one new row remains a learning gap.
FAQ
Questions about this skill.
Is this an automated Heycademy diagnostic?
No. It is a transparent, self-scored 15-item learning check on this page.
Does a perfect score mean I am interview-ready?
No. Follow it with unfamiliar query-writing and explanation tasks, including edge cases.
Why are there three items per skill?
The small balanced set helps choose a study topic. It is not large enough to certify ability.
Continue with the SQL course
Make this skill reliable on new data.
Return to the course options and choose the next learning step.