A simple query 

result-table-1.png
SELECT o.country, o.city, count(*)
FROM person p
JOIN office o ON (p.office_id = o.id)
GROUP BY 1, 2
ORDER BY 1, 2;