Reporting in SQL
Tyler Pernes
Learning & Development Consultant
SELECT *
FROM countries AS c1
JOIN country_stats AS c2
ON c1.id = c2.country_id;
SELECT
region,
SUM(pop_in_millions) AS pop_in_millions
FROM countries AS c1
JOIN country_stats AS c2
ON c1.id = c2.country_id
GROUP BY region;
Reporting in SQL