SocioCryptoHighly active users
    Updated 2024-07-26
    -- forked from Highly active users @ https://flipsidecrypto.xyz/edit/queries/b6ae9a49-15f9-4c1a-b65d-fe9b4955f296

    -- forked from Users categorized by activities @ https://flipsidecrypto.xyz/edit/queries/5542ff9b-0456-48e1-97dd-76917a2ed0e9

    with activities as (
    SELECT
    from_address,
    datediff(day,'2023-08-15',current_date) as days,
    count(DISTINCT tx_hash) as n_txs
    FROM kaia.core.fact_transactions
    WHERE block_timestamp >= '2024-02-01'
    GROUP BY 1
    )

    SELECT
    count(DISTINCT CASE when n_txs > days*5 then from_address end) as count_user
    FROM activities



    QueryRunArchived: QueryRun has been archived