Query editor
-- This query used incompatible data types from Dune SQL alpha and may need to be updated.-- More details can be found on https://dune.com/docs/query/dunesql-changes/selectsum(amt / power(10, p.decimals) * p.price)from(SELECTsv4.evt_block_time as time,cast(sv4.signerAmount as double) * cast(sv4.protocolFee as double)/10000 as amt,sv4.signerToken as addressfrom airswap_ethereum.SwapERC20_v4_evt_SwapERC20 sv4where sv4.evt_block_time >CASEWHEN {{time}} = 'Day' THEN now() - interval '1' dayWHEN {{time}} = 'Week' THEN now() - interval '7' dayWHEN {{time}} = 'Month' THEN now() - interval '1' monthWHEN {{time}} = 'Quarter' THEN now() - interval '3' monthWHEN {{time}} = 'Year' THEN now() - interval '1' yearENDUNIONSELECTsv3.evt_block_time as time,cast(sv3.signerAmount as double) * cast(sv3.protocolFee as double)/10000 as amt,sv3.signerToken as addressfrom airswap_ethereum.Swap_v3_evt_Swap sv3where sv3.evt_block_time >CASEWHEN {{time}} = 'Day' THEN now() - interval '1' dayWHEN {{time}} = 'Week' THEN now() - interval '7' dayWHEN {{time}} = 'Month' THEN now() - interval '1' monthWHEN {{time}} = 'Quarter' THEN now() - interval '3' monthWHEN {{time}} = 'Year' THEN now() - interval '1' yearENDUNIONSELECTs.evt_block_time as time,cast(s.signerAmount as double) * cast(s.signerFee as double)/10000 as amt,s.signerToken as addressfrom airswap_ethereum.Light_evt_Swap swhere s.evt_block_time >CASEWHEN {{time}} = 'Day' THEN now() - interval '1' dayWHEN {{time}} = 'Week' THEN now() - interval '7' dayWHEN {{time}} = 'Month' THEN now() - interval '1' monthWHEN {{time}} = 'Quarter' THEN now() - interval '3' monthWHEN {{time}} = 'Year' THEN now() - interval '1' yearENDUNIONSELECTs.evt_block_time as time,cast(s.signerAmount as double) * cast(s.signerFee as double)/10000 as amt,s.signerToken as addressfrom airswap_bnb.Light_evt_Swap swhere s.evt_block_time >