Abbas_ra21Bera Factory 2
    Updated 2025-02-14
    -- forked from Avalanche Factory 2 @ https://flipsidecrypto.xyz/studio/queries/7bcdd378-e55c-4d0a-be28-911808d77b7e

    select
    date_trunc('day',block_timestamp) as day,
    count (distinct DATA:to) as daily_contracts,
    sum(daily_contracts) over (order by Day) AS "cumulative deployed contract",
    avg(daily_contracts) over (order by Day, Day rows between 2 preceding and current row) as "3 Day MA"
    from
    berachain.testnet.fact_traces
    where
    TYPE like 'CREATE%'
    and day >= current_date - 60
    group by 1


    QueryRunArchived: QueryRun has been archived