SocioCryptoKPIs: Overview
    Updated 2024-11-30
    -- forked from User Metrics: Overview @ https://flipsidecrypto.xyz/studio/queries/f8f44e97-d824-4098-9c0b-3ff5cd68b4ea
    -- forked from User Metrics: Overview @ https://flipsidecrypto.xyz/studio/queries/27f59797-88ea-427b-8c96-1dd80cdf7a5c
    -- forked from DAU @ https://flipsidecrypto.xyz/studio/queries/e987dc66-23b0-4f4b-a242-8fd6b831621a
    -- inspired by https://flipsidecrypto.xyz/seilabs/q/hOAoS7Ewe3kx/weekly-txs
    with cw_txns as (
    SELECT
    *
    FROM
    sei.core.fact_transactions
    WHERE
    tx_from NOT IN (
    SELECT
    address
    FROM
    sei.core.dim_labels
    )
    AND tx_id NOT IN (
    -- remove both evm and oracle txs by doing fee = '0usei'
    SELECT
    DISTINCT tx_id
    FROM
    sei.core.fact_transactions
    WHERE
    fee = '0usei'
    AND block_timestamp :: DATE >= current_date - interval '{{time_frame}}'
    )
    AND fact_transactions_id NOT IN (
    SELECT
    DISTINCT fact_transactions_id
    FROM
    sei.core_evm.fact_transactions
    )
    AND block_timestamp :: DATE >= current_date - interval '{{time_frame}}'
    ),
    cw_active_users as (
    SELECT
    QueryRunArchived: QueryRun has been archived