Query editor
with a as (selectevt_block_time,'disabled' as status,keeperIdfrom powerpool_polygon.PPAgentV2VRF_evt_RegisterAsKeeperwhere contract_address = 0xcdf80c73640a756d0810baba52f3d01280e5be32union allselectevt_block_time,'disabled' as status,keeperIdfrom powerpool_polygon.PPAgentV2VRF_evt_DisableKeeperwhere contract_address = 0xcdf80c73640a756d0810baba52f3d01280e5be32union allselectevt_block_time,'active' as status,keeperIdfrom powerpool_polygon.PPAgentV2VRF_evt_FinalizeKeeperActivationwhere contract_address = 0xcdf80c73640a756d0810baba52f3d01280e5be32),b as (select *, row_number() over (partition by keeperId order by evt_block_time desc) as rn from a),c as (select * from b where rn = 1),keepers_count as (select count(*) as keepers_registered from c),active_keepers as (select count(*) as keepers_active from cwhere status = 'active')select keepers_registered, keepers_activefrom keepers_count cleft join active_keepers a on 1=1