Better HN
topnewbestaskshowjobs
Log inSign up

jenikashah07

3 karma · joined Oct 19, 2022 (4y ago) · 5 submissions

Submissions

comment 4w ago · link · parent

Hi HN, I’m the maker. I got tired of SQL practice that felt like data entry, so I built a game where every exercise is a murder investigation.

There are 18 cases, each based on an Agatha Christie novel (Orient Express, Ackroyd, Death on the Nile and so on). Each case is a real database of suspects, alibis and timelines. You answer 5 questions to work out who did it. The early cases are SELECT and WHERE. Later ones need JOINs, GROUP BY, subqueries and window functions. It’s free with no signup. It works on a laptop or desktop.

A few things that were more interesting to build than I expected:

Answers are checked by comparing your result rows to the expected rows, not your query text, so any correct query passes whether you used a JOIN or a subquery. Postgres errors get translated for beginners. “column does not exist” gets a different hint depending on whether you typoed a column or used double quotes around a text value. Every query runs against Postgres as a read-only role with a 5 second timeout. Only a single SELECT or WITH statement is accepted.

Since I first shared it I’ve added table and column autocomplete, clearer messages when a query isn’t accepted, a case brief, progress steps and a “case closed” card when you solve one.

I’d love feedback on the difficulty curve and on any case where the question felt unfair. It was inspired by Knight Lab’s SQL Murder Mystery, which is a great single puzzle. This is my attempt at a longer path.

2.

Show HN: I turned 18 Agatha Christie novels into SQL murder cases(querythemurder.com ↗)

9 points · by jenikashah07 · 4w ago · 4 comments

comment 5mo ago · link · parent

Thanks so much! Really glad it felt fun rather than just another practice exercise. Did any of the questions trip you up or did it feel about the right difficulty level?

4.

Show HN: Query the Murder – Learn SQL by Solving Agatha Christie Mysteries(querythemurder.com ↗)

2 points · by jenikashah07 · 5mo ago · 2 comments