Combine JOIN with GROUP BY: THE PORT
Deep-cover personas are expensive to maintain. Analysts need to know which covers produce intelligence and which have gone quiet.
Mission briefing
THE PORT is chapter 11, where joins and aggregation finally combine. The COVERS table tracks each false identity; FIELD_REPORTS logs intelligence filed under them through a COVER_ID column. You join the two, then GROUP BY cover to count reports per persona and spot the dormant ones.
The final mission adds HAVING on top of the join, keeping only high-volume covers that clear a report threshold. Join, group, aggregate, filter: that four-step shape is the backbone of production reporting queries and a staple of interview rounds.
Free to play in your browser, no install, with a live database checking every result against the mission objective.
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 COVERS.COVER_NAME, COUNT(*) AS REPORT_TOTAL
FROM COVERS
INNER JOIN FIELD_REPORTS ON COVERS.ID = FIELD_REPORTS.COVER_ID
WHERE COVERS.COUNTRY = 'FRANCE'
GROUP BY COVERS.COVER_NAME;Related guides
Free guides that pair well with this chapter:
Play Port 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.