Moeava fee per tx - sectors
    Updated 2022-11-28
    select
    --date_trunc('day', block_timestamp)::date as date,
    LABEL_TYPE,
    count(tx_hash) as tx_count,
    sum(tx_FEE) as fees,
    fees/tx_count as fee_per_tx
    --sum(fees)over( partition by LABEL_TYPE order by date rows between unbounded preceding and current row ) as cum_fees
    from avalanche.core.fact_transactions t,avalanche.core.dim_labels l
    where t.TO_ADDRESS = l.address
    and
    BLOCK_TIMESTAMP:: date >= '2022-01-01'
    and LABEL_TYPE != 'token'
    and LABEL_TYPE != 'flotsam'
    group by 1 order by 4 desc

    Run a query to Download Data