ShaylinsrrAverage amount swapped
    Updated 2022-06-25

    SELECT date_trunc('day', block_timestamp) as date, 'Metamask' as platform, avg(AMOUNT_USD) as "Average_amount_swapped" from ethereum.core.ez_token_transfers where ORIGIN_TO_ADDRESS='0x881d40237659c251811cec9c364ef91dc08d300c'
    and AMOUNT_USD is not NULL and AMOUNT_USD between 0 and 30000000 and AMOUNT_USD<30000000 AND block_timestamp >= CURRENT_DATE -30 group by 1,2
    UNION
    SELECT date_trunc('day', block_timestamp) as date, 'Uniswap-v3', avg(AMOUNT_IN_USD) as "Average_amount_swapped" from ethereum.core.ez_dex_swaps where AMOUNT_IN_USD is not NULL
    and AMOUNT_IN_USD between 0 and 30000000 and ORIGIN_TO_ADDRESS!='0x881d40237659c251811cec9c364ef91dc08d300c' AND block_timestamp >= CURRENT_DATE -30 group by 1,2
    UNION
    SELECT date_trunc('day', block_timestamp) as date, 'Other_platforms_combined' as platform, avg(AMOUNT_USD) as "Average_amount_swapped" from ethereum.core.ez_token_transfers where ORIGIN_TO_ADDRESS=lower('0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45')
    and AMOUNT_USD is not NULL and AMOUNT_USD between 0 and 30000000 and AMOUNT_USD<30000000 AND block_timestamp >= CURRENT_DATE -30 group by 1,2


    Run a query to Download Data