Query editor
with caveinfo as (SELECT y.evt_tx_hash, playersperround, y.caveid FROM yologames_blast.BlastPokeTheBear_evt_RoundStatusUpdated yINNER JOIN yologames_blast.BlastPokeTheBear_evt_CaveAdded c ON y.caveId = c.caveIdWHERE status = 4),feebycave as (SELECT DISTINCT (value/playersperround) as feecontributed, caveid FROM blast.traces bINNER JOIN caveinfo c on b.tx_hash = c.evt_tx_hashWHERE tx_to = 0x0000000000acc01064aa5280da3f1c41a35827bcAND "to" IN (0xf193c7be595df64de3a4c85063ced1a45b7da59b, 0x6b86fF7863e27d1C8CCf05dF9cB03b8eFaA52125)AND "from" = 0x0000000000acc01064aa5280da3f1c41a35827bc)SELECT player, SUM(feecontributed*numberofrounds/1E18) as feepayed FROM yologames_blast.BlastPokeTheBear_evt_RoundsEntered yINNER JOIN feebycave f ON y.caveid = f.caveidWHERE y.evt_block_time >= CAST('2024-06-21 14:00' as TIMESTAMP)GROUP BY 1ORDER BY 2 DESC