SQL course · 14-day study plan
14-Day SQL Interview Study Plan for Analysts and Developers
Follow a 14-day SQL interview study plan with daily query tasks, two role paths and evidence-based checkpoints.
Original PostgreSQL examples · Learn the method, test the output, explain the result.
Core idea
A daily query plus a fresh check beats passive review.
Day 7 → unseen checkpoint
Day 14 → role task
The direct answer
A two-week plan built around queries you can verify.
A useful SQL interview study plan alternates learning, query writing, debugging and unseen checks. Fourteen days is enough for a focused cycle through the common topics, but not a guarantee of mastery. Each day below has a concrete task and a checkpoint. Adjust the time per session to your baseline and the date of your actual interview.
This plan has two routes: a novice analyst can spend longer on data definitions and grouped metrics; a practising engineer can focus more on edge cases, constraints and plan reasoning. Both still need to explain result grain and verify output. If you have not checked your starting point, use the SQL skills check. Course options follow 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.
Daily routine
Learn, attempt, check and transfer.
- Read one concept and write the rule in one sentence.
- Attempt a query without copying a solved answer.
- Predict the output for a tiny dataset, then run the query.
- Explain any mismatch and repair the first wrong assumption.
- Add one new row or NULL to test whether the method transfers.
Keep a short error log with the prompt, expected output, actual output, corrected rule and next check. This provides more actionable evidence than a count of completed videos or exercises. When a topic remains unreliable, repeat it the next day instead of advancing mechanically.
Original 14-day calendar
One practical query task every day.
| day | topic | task | checkpoint |
|---|---|---|---|
| 1 | Baseline: SELECT, WHERE, NULL | Write two filters; predict rows before running. | One correct output plus one explained error. |
| 2 | Keys and joins | Join customers to orders; include a customer with no order. | Explain INNER versus LEFT output counts. |
| 3 | Join filters | Move a right-table condition between ON and WHERE. | Show which preserved row disappears. |
| 4 | GROUP BY | Count orders and sum paid amounts by customer. | State result grain and excluded statuses. |
| 5 | HAVING and denominators | Filter groups; calculate a rate with stated denominator. | Explain WHERE versus HAVING. |
| 6 | Subqueries and NOT EXISTS | Find customers with no paid order. | Test a NULL in an exclusion list. |
| 7 | Checkpoint one | Solve an unseen join + grouping task without notes. | Log accuracy, explanation and one edge case. |
| 8 | CTEs | Split a multi-step metric into named intermediate results. | Verify CTE output before final filter. |
| 9 | ROW_NUMBER and ties | Find latest event per account with a tie-break. | One deterministic row per account. |
| 10 | RANK and partitions | Rank customers within region. | State whether ties stay or break. |
| 11 | LAG | Compare month revenue with prior month. | Explain first-row NULL and missing months. |
| 12 | Double counting | Join orders to items and repair an inflated sum. | Show bad and corrected totals. |
| 13 | Plan reasoning | Inspect EXPLAIN on a representative PostgreSQL query. | Separate observed plan from guess. |
| 14 | Final unseen task | Solve, explain and verify a role-specific query. | Compare with day 7 and choose next gap. |
The schedule is intentionally cumulative. Day 7 checks joins and grouping without notes; day 14 repeats the process with a role-specific prompt. The checkpoints are self-review standards, not course platform features or formal pass marks.
Worked path A
Novice analyst: protect metric meaning.
Imagine a new analyst who can select rows but has not written many joins. On days 1–3, use customer and order tables small enough to inspect by hand. On days 4–5, define a paid-customer rate: what counts as “paid,” which customers form the denominator, and whether refunded orders are excluded. On day 7, solve a fresh report prompt and check a customer with no orders.
On days 8–11, focus on readable CTEs and month-over-month comparisons. If a month is absent, decide whether the report means previous available month or previous calendar month. On day 14, choose a report-style prompt: one row per region with February paid revenue and customer count. Explain the business definition before presenting SQL.
Day 2: a LEFT JOIN produced five rows for four customers; the learner expected four. Cause: one customer had two orders. Repair: name the joined result grain, then group by customer only when the task requests one row per customer. Day 7 check: the learner predicts row counts correctly on a different dataset with a no-order customer.
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.
Worked path B
Practising engineer: defend edge cases and plans.
Imagine a backend developer comfortable with basic SELECT and joins but rusty on analytical SQL. Use days 1–3 as a fast correctness audit. Spend more time on days 6, 9 and 10: anti-joins with NULLs, deterministic latest-row selection and tied ranks. On day 12, explain why joining an order header to several items inflates a header sum.
For day 13, use PostgreSQL EXPLAIN guidance to inspect an actual plan on representative data. Do not assume an index will always be used. On day 14, choose a service-style prompt: most recent successful event for each account, preserving accounts with no success. State the tie-break, missing-row rule and expected output.
Day 9: the latest-event query selects a row by timestamp only. Two events share the timestamp, so the choice is unspecified. Repair: add an event id tie-break to the window ORDER BY after agreeing that higher id represents later insertion. Day 14 check: add another timestamp tie and confirm the expected account row.
Measure the two checkpoints
Compare method, not just speed.
| Evidence | Day 7 | Day 14 |
|---|---|---|
| Result accuracy | Expected and actual rows on unseen join/group task. | Expected and actual rows on role-specific task. |
| Explanation | Describe grain, keys and filter placement. | Add null, tie, date and performance assumptions where relevant. |
| Transfer | Change one input row and predict the result. | Test a different scenario without copying the first query. |
| Error repair | Name one faulty assumption and correct it. | Show whether that error family recurred. |
Improvement means fewer unexplained mismatches and a method that survives unfamiliar data. A faster answer with incorrect rows is not progress. If the final task still fails on one topic, choose the next lesson from the course overview or practise the 20-question set with new inputs.
Before the interview
Match the actual format.
Confirm whether you will write SQL live, talk through logic, use a specific database, or submit a take-home exercise. Prepare the syntax and environment stated in the invitation. Keep a compact checklist: output grain, keys, filters, nulls, ties, expected rows and explanation. Ask for clarification when a business rule is ambiguous.
The role-specific interview preparation guide helps turn a vacancy into a skills matrix. Use this schedule as a study plan, not as a prediction of recruiter questions.
A reusable 30-minute session
Make each day small enough to finish.
| Minutes | Activity | Output |
|---|---|---|
| 0–5 | State the concept and a likely error. | One-sentence rule. |
| 5–15 | Attempt a query on a tiny input. | SQL plus predicted rows. |
| 15–22 | Run, compare and repair. | Actual output and first wrong assumption. |
| 22–30 | Change one row or condition. | Unseen transfer check. |
If you only have 15 minutes, reduce the dataset and complete one query plus one changed-row check. If you have an hour, add a second unfamiliar prompt. The essential habit is to leave with evidence: an expected result, an actual result and an explanation of any gap. Passive reading may help you encounter a concept, but it does not show whether you can apply it.
Do not use the calendar as a reason to rush past a failed checkpoint. For example, if day 3 shows that a right-table WHERE filter removes unmatched customers, repeat that edge case on day 4 before adding aggregation. The later tasks depend on a correct understanding of the earlier row set.
FAQ
Questions about this skill.
Is 14 days enough to master SQL?
It can support a focused preparation cycle. The time needed depends on your starting point and the role’s SQL depth.
Should analysts and developers follow identical daily tasks?
Keep the common correctness core, then weight report metrics or service/data-access scenarios according to the role.
What should I do after a weak day 7 checkpoint?
Return to the exact error family, solve two fresh variations and move the advanced tasks later if needed.
Continue with the SQL course
Make this skill reliable on new data.
Return to the course options and choose the next learning step.