Open lesson

Mission: gates at night

Command palette

This mission workspace keeps code and notes in this browser tab. Export them before closing it. Running code is practice, not an automatic grade for the mission.

Brief

Read a simple table and write a SELECT ... FROM query that shows useful columns without changing data.

In the story, Imani gives you a few minutes before Voss’s hearing. She sets down the practice passages table: P1 / NOCTIS-01 / North / 21:10; P2 / TEST-02 / South / 21:20; P3 / NOCTIS-01 / South / 21:25. Voss has already drawn a North → South arrow to accuse you of moving the car. Mara asks you for an exact, limited reading of the data.

Your mission

  1. Name the table, its four columns and what one row represents.
  2. Write a query showing passage ID, vehicle code and gate.
  3. Give the three result rows on paper with those columns.
  4. Explain two things this result does not prove and why display order is no guaranteed timeline.

How to check your work

  • The table is passages; a row is a recorded passage; columns are id, vehicle, gate, time.
  • The query is SELECT id, vehicle, gate FROM passages;.
  • P1 / NOCTIS-01 / North, P2 / TEST-02 / South, P3 / NOCTIS-01 / South are recovered.
  • The result proves neither the actual route nor an authorization’s author; no ORDER BY fixes order.

Course example

SELECT vehicle, gate
FROM passages;

SQLite schema and synthetic input

CREATE TABLE passages (id TEXT PRIMARY KEY, vehicle TEXT, gate TEXT, time TEXT);
INSERT INTO passages VALUES ('P1', 'NOCTIS-01', 'North', '21:10'), ('P2', 'TEST-02', 'South', '21:20'), ('P3', 'NOCTIS-01', 'South', '21:25');

Code

Use Tab to leave the editor. Ctrl+Enter runs the source. The lines beginning with -- are task reminders. SQL ignores them. Write your query beneath them.

SQL console

Loading laboratory…

Explore Python or SQL here; this is not an operating-system shell.

This is a disposable browser experiment. The code run here is not recorded as a completed mission.

Each command starts a fresh disposable worker: it runs a captured copy of your current source, then your command with the lesson fixtures. Changes are discarded afterward. Commands never save source or award XP. Ctrl+Enter executes the command.

Virtual workspace files

Source and declarative assets are readable here without JavaScript. Python input files are created at runtime; SQL setup initializes the disposable database.

source.sql

Current editor source. Inspection shows your current edits.

-- Name the table, its four columns and what one row represents.
-- Write a query showing passage ID, vehicle code and gate.
-- Give the three result rows on paper with those columns.
-- Explain two things this result does not prove and why display order is no guaranteed timeline.

exemple.sql

Declarative lesson asset; this is not a file created in the Python filesystem.

SELECT vehicle, gate
FROM passages;
donnees.sql

Declarative lesson asset; this is not a file created in the Python filesystem.

CREATE TABLE passages (id TEXT PRIMARY KEY, vehicle TEXT, gate TEXT, time TEXT);
INSERT INTO passages VALUES ('P1', 'NOCTIS-01', 'North', '21:10'), ('P2', 'TEST-02', 'South', '21:20'), ('P3', 'NOCTIS-01', 'South', '21:25');