with master as (select date , yearweek , r.branch , r.cluster as cluster , sum(volte_traffic_erl) as traffic_erl , sum(maximum_ul_active_user_number_qci_1_unit) as maximum_ul_active_user_number_qci_1 , sum(maximum_dl_active_user_number_qci_1_unit) as maximum_dl_active_user_number_qci_1 , sum(dl_traffic_volume_mbyte) as dl_volume_qci1_mbyte , sum(ul_traffic_volume_mbyte) as ul_volume_qci1_mbyte from r11.meas_4g_daily m join network_cell n on m.network_cell_id = n.id join ref_site r on n.site_id = r.site_id where date between '2023-12-01' and '2023-12-07' group by date , yearweek , r.branch , r.cluster) select date, yearweek as week, branch, cluster, traffic_erl, dl_volume_qci1_mbyte, ul_volume_qci1_mbyte, maximum_ul_active_user_number_qci_1, maximum_dl_active_user_number_qci_1 from master order by branch, cluster, date ;