niloUntitled Query
    Updated 2022-08-08
    with supply as (
    select
    depositor_address as supplier,
    sum(issued_tokens) as supplied_tokens
    from aave.deposits
    where block_timestamp >=CURRENT_DATE-90
    and symbol='AAVE'
    group by 1
    order by 2 desc
    limit 5),
    withdrawn as (
    select
    depositor_address as withdrawer,
    sum(WITHDRAWN_TOKENS) as withdrawn_tokens
    from aave.withdraws
    where block_timestamp >=CURRENT_DATE-90
    and symbol='AAVE'
    group by 1
    order by 2 desc
    limit 5)
    select * , 'Supplier' as type from supply
    union
    select * , 'Withdrawer' as type from withdrawn
    Run a query to Download Data