SELECT
    name AS zone_name,
    COUNT(DISTINCT data_center_id) AS data_center_count,
    COUNT(DISTINCT sh.id) AS total_servers,
    SUM(core_count) AS total_cores,
    SUM(ram) AS total_ram,
    SUM(storage) AS total_storage
FROM memorin.server_hierarchy AS sh
INNER JOIN memorin.geographic_zones AS z
ON z.id = zone_id
GROUP BY name
ORDER BY data_center_count DESC, total_servers DESC, zone_name
