0xHaM-dIntent Users - Pareto Label
    Updated 2025-02-05
    -- forked from Power TX_SIGNERs' Activity @ https://flipsidecrypto.xyz/studio/queries/094a6b84-5e0f-40f5-8b78-ac18975136e7

    with
    lstTb as (
    SELECT
    BLOCK_TIMESTAMP,
    TX_SIGNER,
    TX_HASH,
    TRANSACTION_FEE AS fee_amount
    FROM near.core.fact_transactions
    WHERE year(BLOCK_TIMESTAMP::date) >= '2023'
    )

    -- forked from 0xDataWolf / Retention Pareto Demo @ https://flipsidecrypto.xyz/0xDataWolf/q/6IUCfIcpSTMC/retention-pareto-demo

    , get_volume_per_user as ( -- this is data prep
    select
    TX_SIGNER
    , sum(fee_amount/1e24) AS total_fee
    from lstTb
    group by 1
    order by total_fee desc
    )

    , get_cumulative_count as (
    select
    * , sum(total_fee) over(order by total_fee desc) as cumulative_count
    from get_volume_per_user
    )

    , get_pct_of_cumulative_count as(
    select
    *, cumulative_count / max(cumulative_count) over() as pct_of_cumu_count
    from get_cumulative_count
    )

    Last run: about 1 month ago
    TYPE
    INTENT_SIGNERS
    POWER_GROSS_TRANSFER_VOLUME
    1
    Power3071127003.2
    2
    Normie1961629674.76
    2
    51B
    323s