farid-c9j0VMDallas Cowboys
    Updated 2022-12-05
    WITH
    t1 as (
    SELECT
    trunc(block_timestamp,'day') as date,
    count(distinct buyer) as users,
    sum(users) over (order by date) as cum_users,
    sum(price) as FLOW_volume,
    sum(FLOW_volume) over (order by date) as cum_volume,
    count(distinct tx_id) as sales,
    sum(sales) over (order by date) as cum_sales
    FROM flow.core.ez_nft_sales
    LEFT OUTER JOIN flow.core.dim_allday_metadata ON flow.core.ez_nft_sales.nft_id = flow.core.dim_allday_metadata.nft_id
    WHERE NFLALLDAY_ID is not null
    and team = 'Dallas Cowboys'
    GROUP BY 1
    order by 1 asc
    ),
    t2 as (
    SELECT
    date,
    cum_users,
    cum_volume,
    cum_sales,
    lag(cum_users,11) over (order by date) as lag_users_afterthankgiving,
    ((cum_users-lag_users_afterthankgiving)/lag_users_afterthankgiving)*100 as pcg_users_growth_afterthankgiving,

    lag(cum_volume,11) over (order by date) as lag_volume_afterthankgiving,
    ((cum_volume-lag_volume_afterthankgiving)/lag_volume_afterthankgiving)*100 as pcg_volume_growth_afterthankgiving,


    lag(cum_sales,11) over (order by date) as lag_sales_afterthankgiving,
    ((cum_sales-lag_sales_afterthankgiving)/lag_users_afterthankgiving)*100 as pcg_sales_growth_afterthankgiving

    from t1
    order by 1 asc
    Run a query to Download Data