Browse tools

The Baker Street Index: SQL Casebook

SQL CasebookThe Baker Street Index

0 of 282 stars

Prologue

The Baker Street Index

London, 1902. For twenty years Sherlock Holmes has kept an index: commonplace books full of cuttings, telegrams and notes on every crime and criminal that interested him. It no longer fits on the shelf.

Watson has bought a calculating engine that answers questions written in SQL, and you are the clerk hired to put the index into it. Each chapter reopens one of the old cases. Holmes says they are all closed. The ledger of payments disagrees.

The characters and events come from Arthur Conan Doyle's Sherlock Holmes stories, which are in the public domain. The records, people's dates, telegram wording, payments and puzzles are invented for this game, and so is the money trail that links the cases.

Contains spoilers for A Study in Scarlet, The Sign of Four, A Scandal in Bohemia, The Red-Headed League, The Speckled Band, The Hound of the Baskervilles, The Dancing Men, The Final Problem and The Empty House. Not affiliated with the Conan Doyle Estate.

How it works

  • Each SQL case gives you a question and a fresh copy of the database. Write SQL, press Run to look at your result, and press Submit when you think it answers the question.
  • Submit runs a hidden reference answer on the same data and compares the two results. You can run as often as you like.
  • Stars: one for a correct answer, one for using no hints, and one for using no more tables (or statements) than the reference answer needs.
  • Quiz entries cover the parts of the unit SQLite cannot run, like normal forms, isolation levels and GRANT.
  • Everything runs in this browser. Progress is saved here too, and nothing is sent anywhere.

Have a database of your own? Open it in the SQLite workspace, which runs the same engine.