-- Query: Unpivoted active hosts for charting
-- Result variable: unpivoted_hosts

SELECT
    date,
    '7-day rolling' AS metric_type,
    active_hosts_7day_rolling AS active_hosts
FROM combined_active_hosts

UNION ALL

SELECT
    date,
    '1-day active' AS metric_type,
    active_hosts_1day AS active_hosts
FROM combined_active_hosts

UNION ALL

SELECT
    date,
    '30-day rolling' AS metric_type,
    active_hosts_30day_rolling AS active_hosts
FROM combined_active_hosts

ORDER BY date, metric_type