Ghost in the SQL Data SQL Commands: A Practical Guide to Solving Cases

Master Ghost in the SQL Data SQL commands with this practical guide to SELECT, WHERE, JOIN, and GROUP BY for cracking every Paris case.

Why Ghost in the SQL Data SQL Commands Matter More Than You Think

Most detective games hand you a magnifying glass. Ghost in the SQL Data hands you a query editor. Released on Steam on October 29, 2026, by solo developer Isaac Menard, this simulation-strategy title drops you into a year of Paris emergency switchboard calls and asks you to find, for example, who reported a school fire 14 minutes before the first witness saw it. The only way to get answers is through Ghost in the SQL Data SQL commands — real queries that filter, sort, and join tables of call records.

That's the hook. If you've never written a line of SQL, the game's early cases walk you through the basics. If you have, you'll appreciate how quickly it stops holding your hand. Either way, understanding the core command set is the difference between staring at a wall of rows and pinning the right suspect to your investigator's board.

This guide breaks down the Ghost in the SQL Data SQL commands you'll actually use, with examples modeled on the game's case structure. It's written for players who want to solve cases faster and understand why a query works, not just copy-paste their way through.

The Core Command Set: What You'll Actually Type

The game's store page is explicit: you explore data, filter it, and join tables. That maps to a small, focused set of SQL statements. You don't need to be a database administrator — you need to be fluent in about six commands.

Here's the breakdown of what each command does inside the game's investigation flow:

SQL CommandWhat It Does in Ghost in the SQL DataTypical Case Use
SELECTPulls specific columns from a tableGrabbing call time, caller ID, and location
WHEREFilters rows by a conditionFinding calls within a 14-minute window
ORDER BYSorts resultsRanking calls chronologically
JOINCombines two related tablesLinking calls to addresses or people
GROUP BYAggregates rows into bucketsCounting calls per district
HAVINGFilters aggregated groupsFinding districts with unusual volume

Community reports from early players suggest the first few cases introduce SELECT and WHERE in isolation, then layer in joins once you're comfortable. The later cases, per the developer's description, "only give you the question" — meaning you have to decide which commands to chain together yourself.

SELECT: Your Starting Point

Every investigation begins with a broad look. SELECT * returns everything, which is useful for your first glance at an unfamiliar table but dangerous once tables grow large. A better habit from case one:

SELECT call_time, caller_name, location
FROM emergency_calls
LIMIT 50;

Column names in the actual game will differ — always check the schema panel before writing a query. That single habit will save you more time than any other tip in this guide.

WHERE: Narrowing the Field

The school fire case is a filtering problem at heart. You know a witness saw the fire at a specific time. You need calls that came in 14 minutes earlier. That's a WHERE clause with a time comparison:

SELECT *
FROM emergency_calls
WHERE call_time BETWEEN '13:46:00' AND '14:00:00'
  AND call_type = 'fire';

Note the two conditions joined by AND. Combining filters is where most beginners stall, so practice chaining AND and OR early. A quick mental check: AND narrows results, OR widens them.

Building Queries That Solve Cases, Not Just Run

Running a query that returns 4,000 rows isn't progress. The skill the game rewards is iterative narrowing — start broad, inspect, then tighten. Think of it as interrogating the data the same way a detective interrogates a witness.

Investigation StageQuestion You're AskingCommand Pattern
OrientationWhat tables exist and what's in them?SELECT * ... LIMIT 20
NarrowingWhich rows match my clue?WHERE with one condition
RefiningWhich of those match a second clue?WHERE ... AND ...
ConnectingHow does this row relate to another table?JOIN ... ON
SummarizingIs this pattern unusual?GROUP BY + COUNT

JOIN: Where the Real Detective Work Happens

Single-table queries get you through the tutorial. Cases like the unnamed metro ticket or the stolen crown from the Musée d'Orsay almost certainly require relating records across tables — a call log to an address registry, or a ticket sale to a passenger record.

The pattern looks like this:

SELECT c.call_time, c.caller_name, a.district
FROM emergency_calls c
JOIN addresses a ON c.address_id = a.address_id
WHERE a.district = 'Centre';

The ON clause is the join key — the column both tables share. If your join returns nothing, the first thing to check is whether those key values actually match in format. Mismatched data types (a number stored as text, for example) are a classic silent failure.

GROUP BY and HAVING: Spotting the Anomaly

Mysteries often hinge on something that shouldn't be there — a spike, an outlier, a gap. Aggregation finds those. If you want to know which Paris districts generated an unusual number of calls on a given night:

SELECT district, COUNT(*) AS call_count
FROM emergency_calls
WHERE call_date = '2025-11-03'
GROUP BY district
HAVING COUNT(*) > 20
ORDER BY call_count DESC;

The HAVING clause filters after grouping, while WHERE filters before. Mixing them up is one of the most common errors new players hit, according to player experience shared on community hubs. Remember: WHERE for rows, HAVING for groups.

Common Mistakes and How to Fix Them

Even experienced SQL users trip up in a game context because the schema is unfamiliar and the clock (or your patience) is ticking. Here's a troubleshooting table drawn from typical beginner and intermediate pitfalls:

SymptomLikely CauseFix
Query returns zero rowsFilter value doesn't match stored formatCheck casing, date format, and data type
Duplicate rows after a joinOne-to-many relationshipAdd DISTINCT or refine the join key
Error on column nameTypo or wrong table aliasVerify against the schema panel
HAVING throws an errorUsed without GROUP BYAdd grouping or switch to WHERE
Results look right but case won't closeWrong row pinned to the boardRe-read the case question carefully

That last row matters more than it looks. The investigator's board — where you pin results, charts, and notes and connect clues — is the actual win condition. A correct query with the wrong evidence pinned gets you nowhere.

Practical Tips for Faster Case Solving

Beyond command syntax, a few habits separate smooth runs from frustrating ones.

  • Read the schema before you query. Every table's columns and types are visible somewhere in the interface. Thirty seconds there beats ten minutes of guessing.
  • Use LIMIT liberally. Preview large tables before committing to a full scan.
  • Comment your queries. If the game's editor supports -- comments, annotate what each clause is testing. It makes revisiting a case far easier.
  • Work backward from the question. Identify what the final answer needs to look like, then plan the joins that produce it.
  • Save your best queries. Steam Cloud support means your progress and notes travel with you, so build a personal library of reusable patterns.

The game also ships with Steam Workshop and a level editor, which means community-made cases will likely demand slightly different query shapes. A solid grasp of the core commands transfers directly.

For the official game listing, features, and system requirements, see the Ghost in the SQL Data page on Steam.

Who Should Play, and How Hard Is the SQL?

The store tags tell the story: Detective, Programming, Education, Puzzle, Text-Based. This is a niche game — 82% positive from 34 reviews at launch — and it knows its audience. If you've ever wanted a mystery that treats you like a competent analyst, this is it.

Player TypeExpected Experience
Total SQL beginnerComfortable by case 2–3 thanks to tutorials
Some SQL knowledgeEarly cases feel like review; later ones engage
Experienced developerLater cases are the real test; early ones breeze by
Mystery fans, no coding backgroundDoable, but budget extra time for the basics

The developer has disclosed that AI was used to assist with programming and translations, with a note to report any awkward localized lines on the community hub. Ten languages are supported, including French, Japanese, Korean, and Simplified Chinese.

At $8.99 during the introductory offer (10% off the $9.99 list price through November 12), it's a low-risk entry point for anyone curious about a database-driven detective game. It runs on modest hardware — a dual-core CPU and 4 GB of RAM meet the minimum — and is rated Playable on Steam Deck.

FAQ: Ghost in the SQL Data SQL Commands

Do I need prior SQL experience to play Ghost in the SQL Data? No. The first cases teach the basics of Ghost in the SQL Data SQL commands directly, and later cases ramp up by giving you only the question. Prior exposure helps you move faster, but the game is designed as an on-ramp.

Which SQL commands are used most often in the game? SELECT, WHERE, ORDER BY, JOIN, GROUP BY, and HAVING cover nearly everything. The store description confirms you'll filter data and join tables, which are the two skills that matter most.

Why does my query return no results even though I know the data exists? Almost always a format mismatch — date strings, capitalization, or a numeric value stored as text. Preview the raw table with SELECT * ... LIMIT 20 and compare the exact stored format against your filter.

Can I practice Ghost in the SQL Data SQL commands outside the game? Yes. Any free SQL sandbox lets you rehearse the same patterns — filtering, joining, and grouping — and the skills transfer directly. A demo of the game was also available before launch, per the developer's release notes.

Is the game worth it if I already write SQL professionally? Community reports suggest experienced developers breeze through early cases but find the later, question-only cases genuinely engaging. The investigator's board adds a deduction layer that pure SQL skill won't solve for you.

Final Thoughts

Ghost in the SQL Data is a rare thing: a puzzle game where the puzzle is a well-formed query. The command set is small, the learning curve is gentle at the start, and the satisfaction of pinning the right evidence to your board after a clean join is real. Master the six core commands, read your schemas, and work backward from the case question — that's the whole method. The rest is detective work.