Loading

T11 SQL · Lesson 5

Games: Joins

Choose the right option, fill in the blanks, write small pieces of code and fix broken ones. Code runs in a safe box inside this page.

Solved 0 of 49 items in this lesson.

1 / 27

ledger.db holds two tables. halls (id, name, keeper): 1 Engine Hall (Ines Tappet), 2 Clock Tower (Hakim Verge), 3 Couriers' Yard (Dalia Waybill), 4 Archive (Yusra Hollis). gauges (id, name, hall_id, unit, reading): 1 boiler (1, C, 96.5), 2 pump (1, bar, 4.2), 3 fan (1, rpm, 1200.0), 4 chimney (3, C, NULL), 5 pendulum (2, s, 2.0), 6 kettle (3, C, 88.0), 7 bell (2, Hz, 440.0), 8 valve (1, bar, 4.2), 9 compass (NULL, deg, 270.0). What does this print?

bash
sqlite3 -list ledger.db "SELECT h.keeper FROM gauges g JOIN halls h ON g.hall_id = h.id WHERE g.name = 'bell';"

Back to the lesson