with lst_events as(
select
e.origin_from_address as wallet
,e.event_name as action
,count(DISTINCT e.tx_hash) as actions_count
from optimism.core.fact_event_logs e
where action is not null
and block_timestamp::date >='2022-07-01' and block_timestamp::date<'2022-08-01'
group by 1,2
)
select top 5
action
,count(DISTINCT wallet) as wallets
,sum(actions_count) as tx_count
from lst_events
where action not in ('NewRound','NewTransmission','AnswerUpdated','Sync','Issued','ReserveDataUpdated','Approval')
group by 1
order by tx_count desc