Moe4 Pessi
    Updated 2023-02-03
    select
    date(block_timestamp) as date,

    LABEL_TYPE,
    count(tx_hash) as tx_count,
    count(distinct from_address) as user_count,
    sum(user_count)over( partition by label_type order by date rows between unbounded preceding and current row ) as cum_user_count,
    sum(tx_FEE) as fees,
    sum(Matic_value) as Matic_valuee,
    fees/tx_count as fee_per_tx,
    sum(tx_count)over(partition by label_type order by date rows between unbounded preceding and current row ) as cum_tx_count,
    sum(Matic_valuee)over(partition by label_type order by date rows between unbounded preceding and current row ) as cum_Matic_value,
    sum(fees)over(partition by label_type order by date rows between unbounded preceding and current row ) as cum_fees
    from Polygon.core.fact_transactions t,Polygon.core.dim_labels l
    where t.TO_ADDRESS = l.address

    and LABEL_TYPE != 'token'
    group by 1,2

    Run a query to Download Data