vendettaActive Daily Depositors
    Updated 2023-02-12
    -- forked from ff9702e1-2ab4-4e68-b98c-f7d88684325c

    with aave as (
    select block_timestamp::date as Date, count(distinct depositor_address) as Active_Depositors,
    case when date >= '2021-04-26' and date < '2021-07-12' then 'AIP-16'
    when date >= '2021-08-24' and date < '2021-11-22' then 'AIP-32'
    when date >= '2021-11-22' and date < '2022-02-20' then 'AIP-47'
    when date >= '2022-02-21' and date < '2022-05-20' then 'AIP-60'
    else 'No Incentives' end as period
    from ethereum.aave.ez_deposits
    group by block_timestamp::date
    order by block_timestamp::date desc)
    select *,
    avg(Active_Depositors) OVER(ORDER BY Date
    ROWS BETWEEN 20 PRECEDING AND CURRENT ROW )
    as moving_average
    from aave
    order by date desc
    Run a query to Download Data