Query editor
WITHprices as (select'nETH' as symbol,DATE_TRUNC('day', p.minute) AS day,AVG(p.price) as pricefromprices.usd pWHEREp.blockchain = 'ethereum'AND p.symbol = 'WETH'group BY1,2),events_all as (SELECT'W' as event,evt_tx_hash,fee,tokenFROMsynapse_ethereum.SynapseBridge_evt_TokenWithdrawunion allSELECT'WR' as event,evt_tx_hash,fee,tokenFROMsynapse_ethereum.SynapseBridge_evt_TokenWithdrawAndRemove),events_symbol as (SELECTevent,evt_tx_hash,fee,CASEWHEN bytearray_starts_with (token, 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2) then 'nETH'WHEN bytearray_starts_with (token, 0x1b84765de8b7566e4ceaf4d0fd3c5af52d3dde4f) then 'nUSD'ELSE 'Other'END as symbolFROMevents_all),events_filtered as (select*fromevents_symbolWHEREsymbol <> 'Other'),txs as (SELECTblock_time,hash,gas_price,gas_used,value