Story campaign - Chapter 5

Learn SQL Aggregate Functions: THE FORGE

A strike cannot be authorized on a hunch. Command wants hard numbers on every weapons cache before anyone moves.

Mission briefing

THE FORGE is chapter 5, the aggregate functions chapter. A joint operation has uncovered hidden weapons caches across the Mediterranean, logged in the WEAPONS_CACHE table with LOCATION, CACHE_TYPE, QUANTITY, and THREAT_LEVEL. You answer Command's questions with COUNT(*) and SUM, then combine both in a single filtered report on the most dangerous sites.

The second mission moves to the THREAT_ASSESSMENTS table, where the Director needs statistics for the President's brief: the average threat score with AVG, and the extremes with MIN and MAX.

By the end you can collapse a whole table into one analyst-ready row of numbers.

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 COUNT(*) AS CACHES, SUM(QUANTITY) AS ORDNANCE
FROM WEAPONS_CACHE
WHERE THREAT_LEVEL = 'LOW';

Play Forge 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