Story campaign - Chapter 8

Write Your First SQL JOIN: THE LAB

Until now, AGENTS and MISSIONS have been kept in separate tables as a security precaution. The Director has just authorized cross-referencing them.

Mission briefing

THE LAB is chapter 8, where you write your first SQL JOIN. Operation ATLAS links field agents to their mission assignments: the MISSIONS table carries an AGENT_ID column, and INNER JOIN with ON matches it against AGENTS.ID to reveal who did what.

The warm-up mission works the HANDLER_MEETINGS log, grouping contact records per handler and sorting the busiest first, so the jump to two-table queries lands on a solid GROUP BY foundation.

Joins are the single most tested skill in data interviews. This chapter is where SQL Protocol starts drilling them, and the joins guide linked below is the companion reading.

A query pattern from this chapter

This is the shape of query you practice here, not the answer to any mission. The real stages come with their own data, objectives, and hints.

SELECT AGENTS.CODENAME, MISSIONS.MISSION_NAME
FROM AGENTS
INNER JOIN MISSIONS ON AGENTS.ID = MISSIONS.AGENT_ID
WHERE MISSIONS.PRIORITY = 'LOW';

Related guides

Free guides that pair well with this chapter:

Play Lab now

Free in your browser, desktop only. Guest mode starts instantly with no signup; sign in with Google if you want progress saved across devices.

Play free