yasmin-n-d-r-hsupposed-red copy copy copy copy
    Updated 2025-01-25
    SELECT
    count(distinct tx_hash) as swaps,
    count(distinct user) as users,
    sum(volume) as "Volume (USD)"
    FROM (
    SELECT
    BLOCK_TIMESTAMP,
    'Thorchain' as platform,
    tx_id as tx_hash,
    ifnull(from_address, NATIVE_TO_ADDRESS) as user,
    from_asset as symbol_in,
    to_asset as symbol_out,
    blockchain,
    AFFILIATE_ADDRESS,
    case when FROM_AMOUNT_USD is null then TO_AMOUNT_USD else FROM_AMOUNT_USD end as volume
    FROM thorchain.defi.fact_swaps
    WHERE BLOCK_TIMESTAMP::date >= '2025-01-11'
    ) tb1;

    -- BNB 2021-04-11 00:00:00.000

    -- LTC 2021-04-11 00:00:00.000

    -- BASE 2025-01-12 00:00:00.000

    -- DOGE 2022-01-17 00:00:00.000

    -- BTC 2021-04-12 00:00:00.000

    -- THOR 2021-04-11 00:00:00.000

    -- AVAX 2022-09-24 00:00:00.000

    -- BCH 2021-04-12 00:00:00.000

    -- BSC 2023-09-13 00:00:00.000
    Last run: 3 months ago
    SWAPS
    USERS
    Volume (USD)
    1
    509605337152691663883.32071
    1
    33B
    2s