i_danTrading Overview
    Updated 2025-04-10
    -- base data for this query is forked from maybeyonas / all_trades @ https://flipsidecrypto.xyz/maybeyonas/q/jlVxCDPAr4zs/all_trades

    SELECT --*
    Count(tx_hash) AS "Swap Transactions"
    , COUNT(DISTINCT pool_name) AS "Total Pools"
    , COUNT(DISTINCT trader) AS "Traders"
    , SUM(CASE WHEN amount_sold_usd IS NOT NULL THEN amount_sold_usd ELSE ABS(amount_bought_usd) END) AS "Volume Traded"

    FROM (with -- data from maybeyonas / all_trades @ https://flipsidecrypto.xyz/maybeyonas/q/jlVxCDPAr4zs/all_trades
    all_trades as (
    select *,
    'ambient' as dex,
    from $query('4c4a1412-4289-475f-96d3-6c9ef01b2f6b') -- ambient
    union all
    select *,
    'neptune' as dex,
    from $query('cfb69e61-0326-4da7-b950-ed4d14f8ea4d') -- neptune
    union all
    select *,
    'velodrome' as dex,
    from $query('7dac59b3-ee1b-402f-b753-c164f3914b16') -- velodrome basic pools
    union all
    select *,
    'velodrome' as dex,
    from $query('2440c86f-71b2-4c8a-bf11-6ad37e0fbfff') -- velodrome concentrated pools
    ),
    tokens as (
    select
    bridge,
    swellchain_address,
    ethereum_token,
    symbol,
    decimals,
    from $query('b88b8cd2-1f2e-4d2b-9e37-bb86e5f55dbe')
    ),
    eth_onchain_prices as (
    Last run: 23 days ago
    Swap Transactions
    Total Pools
    Traders
    Volume Traded
    1
    11495145268653413965.8313805
    1
    35B
    1s