Query editor
WITH DISP_ETH as (SELECTcall_block_date,call_tx_hash,call_tx_from,call_tx_to,recipient,value/ 1e18 AS amount,'ETH' AS token,CASE call_tx_hash -- transacciones en las que se envió ETH en batchWHEN 0x4c48d8bebc0d636f6618ddccbbd7df03c6dd08b0f8b7b3e7dde23c6b467a27a3 then 'Introduction to DeFi - Económica PUCP'WHEN 0xb25ce7d1cd169e666bbf5014c452fae31abd163621b703d09614652c462efbef then 'Introduction to DeFi - Económica PUCP'WHEN 0x5e451e8424dbd080bf1370371c8df37ee10f63fb4af54099d47413735a067914 then 'Introduction to DeFi - UNMSM'WHEN 0xb484154f3b665de0dff9b8f8dcbc646a4bfdaab01930c332ad4fc6b3c53bda92 then 'Introduction to DeFi - Docentes PUCP'WHEN 0x9aa01edb5151f0e500421c0a38f4aeae353d42811ec2ef00e5dedc38dc25b989 then 'Introduction to DeFi - dETHconomics M1'WHEN 0x38ba3c9b9341806951ace8b244336b333eb0bc858b81b21f2742207e64946adf then 'Introduction to DeFi - dETHconomics M1'ELSE 'Other'END AS SessionFROM disperse_optimism.Disperse_call_disperseEthercross join unnest(recipients,"values") AS t(recipient,value)WHERE call_tx_from = 0x8f7d6300d2B978f9AFAD3a38CC154C0f10dF5962 orcall_tx_from = 0x3a08AC947933C4C25C0cC3ccD2088476e27aAB4e --solo filtro la address de OP Mission),--agrego la fecha de cada sesiónDISP_DATE as (select *,CASE SessionWHEN 'Introduction to DeFi - Económica PUCP' then '2024-10-10'WHEN 'Introduction to DeFi - UNMSM' then '2024-10-07'WHEN 'Introduction to DeFi - Docentes PUCP' then '2024-10-30'WHEN 'Introduction to DeFi - dETHconomics M1' then '2025-02-19'ELSE NUllEND AS session_datefrom DISP_ETH)SELECT session_date,session,token,round(sum(amount),4) as rewardsFROM DISP_DATEWHERE token = 'ETH' AND session <> 'Other'GROUP BY session_date,session,tokenorder by session_date asc