Mr_AceONCHAIN SELLERS AND BUYERS
    Updated 2024-05-02
    WITH A AS (
    SELECT
    COUNT(DISTINCT TX_ID) AS BUYS,
    COUNT(DISTINCT TRADER) AS BUYERS
    FROM
    osmosis.defi.fact_swaps
    WHERE
    TO_CURRENCY = 'ibc/1480B8FD20AD5FCAE81EA87584D269547DD4D436843C1D20F15E00EB64743EF4'
    AND BLOCK_TIMESTAMP >= '2024-01-01'
    ),
    B AS (
    SELECT
    COUNT(DISTINCT TX_ID) AS SELLS,
    COUNT(DISTINCT TRADER) AS SELLERS
    FROM
    osmosis.defi.fact_swaps
    WHERE
    FROM_CURRENCY = 'ibc/1480B8FD20AD5FCAE81EA87584D269547DD4D436843C1D20F15E00EB64743EF4'
    AND BLOCK_TIMESTAMP >= '2024-01-01'
    ),
    C AS (
    SELECT
    COUNT(DISTINCT TRADER) AS "TOTAL TRADERS",
    COUNT(DISTINCT TX_ID) AS "TOTAL TRADES"
    FROM
    osmosis.defi.fact_swaps
    WHERE
    (
    FROM_CURRENCY LIKE 'ibc/1480B8FD20AD5FCAE81EA87584D269547DD4D436843C1D20F15E00EB64743EF4'
    OR TO_CURRENCY LIKE 'ibc/1480B8FD20AD5FCAE81EA87584D269547DD4D436843C1D20F15E00EB64743EF4'
    )
    AND BLOCK_TIMESTAMP >= '2024-01-01'
    )
    SELECT
    BUYERS,
    SELLERS,
    QueryRunArchived: QueryRun has been archived