0xHaM-dLabel Count copy
    Updated 2024-07-24
    -- forked from Label Count @ https://flipsidecrypto.xyz/edit/queries/6ba7c883-bec6-4bad-abee-c15b59d671fb

    -- forked from Label Count @ https://flipsidecrypto.xyz/edit/queries/ae441b29-d56c-4dfb-8d4d-6699b798baa8

    -- forked from Playwo / Users Total @ https://flipsidecrypto.xyz/Playwo/q/jnbOOVFcO0wH/users-total

    WITH timeframe AS (
    SELECT date_day AS date
    FROM crosschain.core.dim_dates
    ),
    volume_events as (
    SELECT DISTINCT
    block_timestamp,
    TX_ID,
    TX_FROM,
    (fee)/pow(10,6) as fee_amount,
    FROM axelar.core.fact_transactions
    )
    , lstTb as (
    SELECT
    block_timestamp,
    TX_FROM,
    TX_ID,
    NVL(fee_amount, 0) AS fee
    FROM volume_events
    )

    -- 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_FROM
    , sum(fee) AS total_fee
    from lstTb
    group by 1
    order by total_fee desc
    QueryRunArchived: QueryRun has been archived