Avax AmbassadorsContracts Active Daily
    Updated 8 days ago
    with
    daily_contracts as (
    select
    date(block_timestamp) as day,
    count(distinct contract_address) as active_contracts,
    avg(active_contracts) over (order by day rows between 6 preceding and current row) as rolling_avg
    -- add 7d or Q4 average

    from
    avalanche.core.fact_event_logs
    where
    1=1
    and block_timestamp between '{{StartDate}}' and '{{EndDate}}'
    group by day
    ),

    total_contracts as (
    select
    count(distinct contract_address) as active_contracts_quarter
    from
    avalanche.core.fact_event_logs
    where
    1=1
    and block_timestamp between '{{StartDate}}' and '{{EndDate}}'
    )

    select * from daily_contracts
    full outer join total_contracts

    Last run: 8 days agoAuto-refreshes every 24 hours
    DAY
    ACTIVE_CONTRACTS
    ROLLING_AVG
    ACTIVE_CONTRACTS_QUARTER
    1
    2024-01-01 00:00:00.00049824982125435
    2
    2024-01-02 00:00:00.00061565569125435
    3
    2024-01-03 00:00:00.00061125750125435
    4
    2024-01-04 00:00:00.00059365796.5125435
    5
    2024-01-05 00:00:00.00057395785125435
    6
    2024-01-06 00:00:00.00052475695.333125435
    7
    2024-01-07 00:00:00.00049665591.142125435
    8
    2024-01-08 00:00:00.00053505643.714125435
    9
    2024-01-09 00:00:00.00055985564125435
    10
    2024-01-10 00:00:00.00055255480.142125435
    11
    2024-01-11 00:00:00.00056405437.857125435
    12
    2024-01-12 00:00:00.00052505368125435
    13
    2024-01-13 00:00:00.00046825287.285125435
    14
    2024-01-14 00:00:00.00047125251125435
    15
    2024-01-15 00:00:00.00048325177125435
    16
    2024-01-16 00:00:00.00051225109125435
    17
    2024-01-17 00:00:00.00050055034.714125435
    18
    2024-01-18 00:00:00.00053154988.285125435
    19
    2024-01-19 00:00:00.00049824950125435
    20
    2024-01-20 00:00:00.00045894936.714125435
    ...
    181
    9KB
    8s