khanhTop depositor per day
    Updated 2022-09-23
    with t as (
    select
    block_timestamp::date as day,
    depositor_address,
    count(distinct(tx_hash)) as tx_num,
    sum (supplied_usd) as total_deposited_usd,
    row_number() over (partition by day order by total_deposited_usd desc) as n
    from ethereum.aave.ez_deposits
    where aave_version = 'Aave V2'
    group by depositor_address, day
    qualify n = 1
    order by total_deposited_usd desc
    limit 10
    )

    select day, depositor_address, tx_num, total_deposited_usd from t
    Run a query to Download Data