ellerydurwinAvalanche users
    Updated 2024-09-18
    WITH tab AS (
    SELECT
    date_trunc('week', block_timestamp) AS date,
    tx_hash,
    ORIGIN_FROM_ADDRESS AS wallet,
    CONTRACT_ADDRESS,
    LABEL_TYPE,
    ADDRESS_NAME,
    LABEL_SUBTYPE,
    TX_STATUS
    FROM
    avalanche.core.fact_event_logs
    JOIN avalanche.core.dim_labels ON address = CONTRACT_ADDRESS
    )
    SELECT
    date,
    tx_hash,
    COUNT(tx_hash) AS transactionNum,
    wallet,
    LABEL_TYPE,
    ADDRESS_NAME,
    LABEL_SUBTYPE
    FROM
    tab
    WHERE
    date >= '2023-01-01'
    GROUP BY
    date,LABEL_TYPE,wallet,ADDRESS_NAME,LABEL_SUBTYPE,tx_hash
    --LIMIT 50;
    QueryRunArchived: QueryRun has been archived