Explain Your Query — The SQL Interview, Answered on a Healthcare Database
What this course is
Most SQL interviews hand you tables you have never seen and ask a question about them. What is judged is whether you find out what the tables hold before you write anything, whether your query returns the right rows for the right reason, and whether you can say why in plain words. The job that follows asks for the same things every day. This is the Academy edition of the LucidPlexus field book Explain Your Query: seventeen lessons, one per chapter, with the book's figures and every query runnable on the page.
Every answer is shown on six tables from a fictional hospital network, HealSync: insurance claims, telemedicine sessions, satisfaction surveys, public-health measurements, research studies and the workforce. Two tables contain rows recorded twice, some sessions name doctors who do not exist, two tables connect to nothing and one has no key. You learn why SQL persists, how to read unfamiliar tables, how dialects differ and how a query runs; SQL against spreadsheets, Python, BI tools and document databases; keys and duplicates, joins, filtering and grouping, CTEs, window functions and performance, each with the common wrong answers; then a take-home and a live test worked end to end, the ordinary week of an analyst, ten interview answers to say aloud and ten checks to run before trusting a join.
What this course proves
The certificate shows you can answer the questions SQL interviews ask correctly, explain the answer aloud, and show it on real tables with the checks that make it trustworthy, including a take-home that ends in a written recommendation. It is awarded when all lessons are complete, every lesson quiz is passed and the final project is approved.
Data
Every lesson's Run button, the practice and the final project use six tables: insurance_claims, telemedicine_usage, patient_satisfaction, public_health, medical_research and healthcare_workforce. Reader page: https://lucidplexus.com/community/dataset.php?slug=healsync
The final project runs in the career-project IDE in your browser, with SQL, Python and charts, and needs no Community membership. Community members can also take the track Explain Your Query, which does the same work as one notebook for the whole book.
What you'll learn
- Read unfamiliar tables before querying them: grain, keys, cardinality and what joins to what
- Say which parts of a query are standard and which change between DuckDB, PostgreSQL, SQL Server, MySQL, Snowflake and BigQuery
- Explain how a query runs, from the logical order of its clauses to a plan read with EXPLAIN ANALYZE
- Decide where a calculation belongs: the database, a spreadsheet, pandas or a BI measure
- Test keys, remove duplicates with a stated rule, and predict the row count of any join
- Use WHERE and HAVING, the forms of COUNT, CASE, UNION, CTEs and window functions correctly, with their NULL rules
- Work a slow query with a method and write sargable conditions
- Complete a take-home and a live test end to end, and say each answer aloud with its evidence
17 lessons · 16.1 h
- Why SQL Is Still the Language of Data Quiz 45 min
- Reading Tables You Have Never Seen Quiz 55 min
- One Standard, Many Dialects Quiz 65 min
- How a Query Runs Quiz 50 min
- SQL or a Spreadsheet Quiz 50 min
- SQL, Python and the BI Layer Quiz 50 min
- Relational or Not Quiz 60 min
- Keys, Cardinality and Duplicates Quiz 75 min
- Joins, Explained Properly Quiz 60 min
- Filtering, Grouping and Combining Quiz 65 min
- CTEs, Subqueries and Temporary Tables Quiz 60 min
- Window Functions and Dates Quiz 65 min
- Indexes and Performance Quiz 50 min
- The Take-Home and the Live Test Quiz 70 min
- Day to Day as an Analyst Quiz 55 min
- Ten Interview Questions and How to Answer Them Aloud Quiz 50 min
- Ten Things to Check Before You Trust a Join Quiz 40 min
How you earn the certificate
- Complete at least 100% of the lessons.
- Pass each of the 17 lesson quizzes with 70% or more. You can retake them.
- Build the final project, Explain Your Query — the HealSync take-home, and have it approved by a reviewer.
Every certificate has a public link employers can use to check it, and you can add it to LinkedIn.
Who it's for
- Analysts preparing for a SQL interview
- Analysts in their first months of work who keep meeting the same questions from colleagues and from their own results
- Spreadsheet and pandas users who want to know what SQL does better, what it does worse, and how to move between them
Before you start
- You can write a basic SELECT with WHERE
- A browser: everything runs in it, nothing to install