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.

SQL LEARNING PREVIEW
Self-check lessonPostgreSQL

Core idea

A short check should guide your study, not certify mastery.

Rows → joins → groups
Windows → NULLs
Record the error family
First understand the query.Then try the next variation without copying the answer.

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.

Launching soon!
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.

Five skills × three items = 15 preliminary checks
itemskillprompt
1RowsWhich clause filters order rows before grouping?
2RowsWhat does SELECT choose?
3RowsCan WHERE use SUM(amount) at the same query level?
4JoinsHow many rows result when one customer matches two orders?
5JoinsWhich join preserves a customer with no order?
6JoinsWhere should a right-table qualifying condition go if every customer must remain?
7GroupsWhat is one result row after GROUP BY customer_id?
8GroupsDoes COUNT(column) count nulls?
9GroupsWhich clause filters groups by SUM(amount)?
10WindowsDoes ROW_NUMBER retain input rows?
11WindowsWhat does PARTITION BY region reset?
12WindowsWhat extra rule makes ties deterministic for ROW_NUMBER?
13NullsDoes x = NULL identify missing values?
14NullsCan NOT IN behave unexpectedly if its list contains NULL?
15NullsWhat does COUNT(*) count after a LEFT JOIN?
Open the complete answer key
Self-check answer key
itemskillanswer
1RowsWHERE
2RowsOutput expressions
3RowsNo; use HAVING
4JoinsTwo
5JoinsLEFT JOIN
6JoinsON
7GroupsOne customer group
8GroupsNo
9GroupsHAVING
10WindowsYes
11WindowsThe window calculation per region
12WindowsA tie-break column in ORDER BY
13NullsNo; use IS NULL
14NullsYes; result may be unknown
15NullsOutput 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.

Self-study rule; not a statistical diagnostic
Score in a familyInterpretationNext activity
0–1 of 3Concept needs a rebuild.Read the relevant lesson; run its worked example, then change one input row.
2 of 3One edge case is not secure.Identify the missed rule and solve two new variations.
3 of 3Recognition is promising, not proof.Write an unseen query and explain its output before running it.
Illustrative reportExample: 10 of 15, with a join gap

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.

Explore course options →

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.

One unseen check per skill family
Missed familyFresh transfer taskEvidence to keep
RowsFilter paid orders before grouping.Expected included order ids.
JoinsPreserve a customer with no qualifying order.Output row count and null columns.
GroupsCount matching orders per customer.COUNT(*) versus COUNT(order_id).
WindowsChoose one latest event under a timestamp tie.Explicit tie-break and chosen event.
NullsFind 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.

Take the next step →
Scroll to Top