select datetime
     , n.site_id
     , r.branch
     , r.rtpo
     , r.kota_kabupaten
     , avg(pd_packet_loss_rate)                      as pd_packet_loss_rate_percent
     , avg(mean_round_trip_delay_ms)                 as mean_round_trip_delay_ms
     , avg(mean_delay_jitter_ms)                     as mean_delay_jitter_ms
     , avg(rate_of_lost_detected_packet_1_div_10000) as rate_of_lost_detected_packet_1_div_10000
from r11.pl_2g_hourly p
         join network_site n on p.network_site_id = n.id
         join ref_site r on r.site_id = n.site_id
where p.date between '2023-12-01' and '2023-12-01'
  and system_mode = 'GSM'
group by datetime
       , n.site_id
       , r.branch
       , r.rtpo
       , r.kota_kabupaten
order by branch, rtpo, kota_kabupaten, n.site_id, datetime
;