Abolfazl_771025daily eth withdrawal all over time
    Updated 2022-09-16
    select
    'sushi' as protocols,
    date_trunc('day', block_timestamp) as date,
    count(tx_hash) as "transaction count",
    sum(AMOUNT_OUT_USD) as "volume of removed ETH (USD)"
    from ethereum.sushi.ez_swaps
    where symbol_out like '%ETH%'
    --and block_timestamp >= CURRENT_DATE - 30
    group by 1,2
    union
    select
    'aave' as protocols,
    date_trunc('day', block_timestamp) as date,
    count(tx_hash) as "transaction count",
    sum(WITHDRAWN_USD) as "volume of removed ETH (USD)"
    from ethereum.aave.ez_withdraws
    where symbol like '%ETH%'
    --and block_timestamp >= CURRENT_DATE - 30
    group by 1,2
    union
    select
    'thorchain' as protocols,
    date_trunc('day', block_timestamp) as date,
    count(tx_id) as "transaction count",
    sum(TO_AMOUNT_USD) as "volume of removed ETH (USD)"
    from flipside_prod_db.thorchain.swaps
    where to_asset like '%ETH%'
    --and block_timestamp >= CURRENT_DATE - 30
    group by 1,2
    union
    select
    'uni' as protocols,
    date_trunc('day', block_timestamp) as date,
    count(tx_hash) as "transaction count",
    sum(CASE
    when AMOUNT1_USD >= 0 then AMOUNT1_USD
    Run a query to Download Data