HadisehTotal
    Updated 2025-05-09
    SELECT
    COUNT(DISTINCT t.chain) AS chain_count,
    COUNT(DISTINCT t.liquidity_pool) AS pool_count,
    COUNT(DISTINCT t.transaction_id) AS swap_count,
    COUNT(DISTINCT t.user_address) AS unique_users,
    SUM(t.transaction_volume) AS total_transaction_volume
    FROM
    (SELECT
    COALESCE(from_amount_usd, to_amount_usd) AS transaction_volume,
    blockchain AS chain,
    pool_name AS liquidity_pool,
    tx_id AS transaction_id,
    from_address AS user_address
    FROM
    thorchain.defi.fact_swaps
    WHERE
    block_timestamp::date >= '2024-01-01'
    ) AS t;

    QueryRunArchived: QueryRun has been archived