mlhUntitled Query
    Updated 2022-09-18
    select date_trunc('day', BLOCK_TIMESTAMP) AS date,
    'Aave' as protocol,
    sum(WITHDRAWN_TOKENS) AS ETH_withdraw_volume,
    count(distinct DEPOSITOR_ADDRESS) AS distinct_withdrawer
    from ethereum.aave.ez_withdraws
    where SYMBOL like '%ETH%'
    and date >= CURRENT_DATE- 90
    group by 1, 2

    UNION

    select date_trunc('day', BLOCK_TIMESTAMP) AS date,
    'Maker' as protocol,
    sum(AMOUNT_WITHDRAWN) AS ETH_withdraw_volume,
    count(DISTINCT WITHDRAWER) AS distinct_withdrawer
    from ethereum.maker.ez_withdrawals
    where SYMBOL='WETH'
    and date >= CURRENT_DATE- 90
    group by 1, 2

    UNION

    select date_trunc('day', BLOCK_TIMESTAMP) AS date,
    'Compound' as protocol,
    sum(RECEIVED_AMOUNT) AS ETH_withdraw_volume,
    count(DISTINCT REDEEMER) AS distinct_withdrawer
    from ethereum.compound.ez_redemptions
    where RECEIVED_CONTRACT_SYMBOL='ETH'
    and date >= CURRENT_DATE- 90
    group by 1, 2

    Run a query to Download Data