zquery/V2/Request/Ristanto/daily_nop.sql

19 lines
886 B
SQL

select region
, level_value as nop
, date
, sum(payload_mbyte)::numeric(100, 2) as payload_mbyte
, sum(case
when region = 'PUMA' then sum_of_maximum_number_of_rrc_connection_user_unit
else maximum_number_of_rrc_connection_user_unit end) as sum_of_maximum_number_of_rrc_connection_user
, sum(sum_of_active_users_rnp)::numeric(100, 2) as sum_of_active_users_rnp
, avg(active_users_rnp)::numeric(100, 2) as active_users_rnp
from app.fact_category_kpi_4g_daily m
where level_type = 'NOP'
and all_band = true
and date between '2022-01-01' and date_int(1)
-- and region = 'SULAWESI'
-- and region = 'KALIMANTAN'
-- and region = 'PUMA'
group by region, level_value, date
order by region, level_value, date desc
;