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/SELECTevt_block_time as time,cast(amount as double) / power(10, p.decimals) as amt,p.symbol as symbol,'Ethereum' as network,cast(amount as double) / power(10, p.decimals) * p.price as amt_usdFROM airswap_ethereum.Pool_evt_WithdrawLEFT JOIN prices.usd p on p.blockchain = 'ethereum' and p.contract_address = token and date_trunc('minute', evt_block_time) = p.minuteWHERE account = {{address}}UNION ALLSELECTevt_block_time as time,cast(amount as double) / power(10, p.decimals) as amt,p.symbol as symbol,'Ethereum' as network,cast(amount as double) / power(10, p.decimals) * p.price as amt_usdFROM airswap_ethereum.PoolV3_evt_WithdrawLEFT JOIN prices.usd p on p.blockchain = 'ethereum' and p.contract_address = token and date_trunc('minute', evt_block_time) = p.minuteWHERE account = {{address}}UNIONSELECTevt_block_time as time,cast(amount as double) / power(10, p.decimals) as amt,p.symbol as symbol,'Ethereum' as network,cast(amount as double) / power(10, p.decimals) * p.price as amt_usdFROM airswap_ethereum.Pool_v3_1_evt_WithdrawLEFT JOIN prices.usd p on p.blockchain = 'ethereum' and p.contract_address = token and date_trunc('minute', evt_block_time) = p.minuteWHERE account = {{address}}UNIONSELECTevt_block_time as time,cast(amount as double) / power(10, p.decimals) as amt,p.symbol as symbol,'Ethereum' as network,cast(amount as double) / power(10, p.decimals) * p.price as amt_usdFROM airswap_ethereum.Pool_v4_evt_WithdrawLEFT JOIN prices.usd p on p.blockchain = 'ethereum' and p.contract_address = token and date_trunc('minute', evt_block_time) = p.minuteWHERE account = {{address}}UNIONSELECTevt_block_time as time,cast(amount as double) / power(10, p.decimals) as amt,p.symbol as symbol,'Ethereum' as network,cast(amount as double) / power(10, p.decimals) * p.price as amt_usdFROM airswap_ethereum.Pool_v4_1_evt_WithdrawLEFT JOIN prices.usd p on p.blockchain = 'ethereum' and p.contract_address = token and date_trunc('minute', evt_block_time) = p.minuteWHERE account = {{address}}