with master as (select m.tech
                     , m.date
                     , site_id
                     , sum(tch_traffic_erlang) as traffic
                     , sum(payload_mbyte)      as payload_mbyte

                from r11.meas_2g_daily m
                         join network_cell n on m.network_cell_id = n.id
                where m.date between '2023-12-01' and '2023-12-01'
                group by m.tech
                       , m.date
                       , site_id

                union

                select m.tech
                     , m.date
                     , site_id

                     , sum(volte_traffic_erl) as traffic
                     , sum(m.payload_mbyte)   as payload_mbyte

                from r11.meas_4g_daily m
                         join network_cell n on m.network_cell_id = n.id
                where m.date between '2023-12-01' and '2023-12-01'
                group by m.tech
                       , m.date
                       , site_id

                union

                select m.tech
                     , m.date
                     , site_id

                     , 0              as traffic
                     , sum(m.payload) as payload_mbyte

                from r11.meas_5g_daily m
                         join network_cell n on m.network_cell_id = n.id
                where m.date between '2023-12-01' and '2023-12-01'
                group by m.tech
                       , m.date
                       , site_id)
select *
from master
order by tech
       , site_id
       , date;