select tx:receipt[4]:outcome:executor_id as protocol, (avg(TRANSACTION_FEE / pow(10,12))) as average_fee from near.core.fact_transactions
where protocol != ''
and (
protocol = 'v2.ref-finance.near' OR
protocol = 'v2.ref-farming.near' OR
protocol = 'v1.jumbo_exchange.near' OR
protocol = 'app.nearcrowd.near' OR
protocol = 'backend.v1.pembrock.near' OR
protocol = 'operator.meta-pool.near' OR
protocol = 'v1.orderbook.near' OR
protocol = 'v1.pembrock.near'
)
group by protocol
order by average_fee desc limit 10