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 o.country, o.city
ORDER BY o.country, o.city;