Query editor
with tokens as (selectprices.blockchain,prices.contract_address,prices.symbol,prices.decimals,prices.price,mapping.polygon_contract_addressfrom (selectcoalesce(contract_address, 0x0000000000000000000000000000000000000000) as contract_address,coalesce(blockchain, 'ethereum') as blockchain,coalesce(decimals, 18) as decimals,symbol, minute, pricefrom prices.usd_latestwhere (blockchain = 'ethereum' or (blockchain is null and symbol = 'ETH'))) pricesinner join query_2608405 mapping on coalesce(prices.contract_address, 0x0000000000000000000000000000000000000000) = mapping.ethereum_contract_address),ethereum_all_transfers AS ((selectcontract_address as contract_address,evt_block_time as block_time,"from" as "from","to" as "to",evt_tx_hash as tx_hash,value as valuefrom erc20_ethereum.evt_Transferwhere trueand evt_block_time >= timestamp '{{start_time}}')union all(select0x0000000000000000000000000000000000000000 as contract_address,block_time,"from","to",tx_hash as tx_hash,cast(value as uint256) as valuefrom ethereum.traceswhere trueand block_time >= timestamp '{{start_time}}'and successand call_type = 'call')),polygon_all_transfers AS (selectcontract_address as contract_address,evt_block_time as block_time,"from" as "from","to" as "to",evt_tx_hash as tx_hash,value as valuefrom erc20_polygon.evt_Transferwhere true