Updated 2025-03-02
    WITH eth_trades AS (
    SELECT
    'Ethereum' AS chain,
    DATE_TRUNC('day', block_timestamp) AS date,
    COUNT(DISTINCT tx_hash) AS total_trades,
    SUM(amount_in_usd) AS total_trades_volume,
    COUNT(DISTINCT origin_from_address) AS total_traders
    FROM ethereum.defi.ez_dex_swaps
    WHERE pool_name IN (
    'USD0-LBTC 3000 60 UNI-V3 LP',
    'WBTC-LBTC 100 1 UNI-V3 LP',
    'eBTC-LBTC 500 10 UNI-V3 LP',
    'LBTC-WETH',
    'LBTC-cbBTC 500 10 UNI-V3 LP',
    'WBTC-LBTC 500 10 UNI-V3 LP'
    )
    GROUP BY chain, date
    ),
    base_trades AS (
    SELECT
    'Base' AS chain,
    DATE_TRUNC('day', block_timestamp) AS date,
    COUNT(DISTINCT tx_hash) AS total_trades,
    SUM(amount_in_usd) AS total_trades_volume,
    COUNT(DISTINCT origin_from_address) AS total_traders
    FROM base.defi.ez_dex_swaps
    WHERE pool_name IN (
    'cbBTC-LBTC 3000 60 UNI-V3 LP',
    'cbBTC-0xeca...11c1 0 1 ASLP',
    'Balancer LBTC/cbBTC',
    'cbBTC-LBTC'
    )
    GROUP BY chain, date
    ),
    bsc_trades AS (
    SELECT
    Last run: 2 months ago
    CHAIN
    DATE
    TOTAL_TRADES
    TOTAL_TRADES_VOLUME
    TOTAL_TRADERS
    CUMULATIVE_TRADES
    CUMULATIVE_VOLUME
    CUMULATIVE_TRADERS
    1
    BSC2021-06-12 00:00:00.00063306058.8553063306058.85530
    2
    BSC2021-06-13 00:00:00.000515643725.3815771148649784.232107
    3
    BSC2021-06-14 00:00:00.0009722114.882851245851899.112392
    4
    BSC2021-06-15 00:00:00.000387765.831411284552664.942533
    5
    BSC2021-06-16 00:00:00.000176170.93851302152835.872618
    6
    BSC2021-06-17 00:00:00.00012560.31481314652896.182666
    7
    BSC2021-06-18 00:00:00.0004968.31311319552964.492697
    8
    BSC2021-06-19 00:00:00.000189115.67261338453080.162723
    9
    BSC2021-06-20 00:00:00.0005696.58291344053176.742752
    10
    BSC2021-06-21 00:00:00.0005543.03311349553219.772783
    11
    BSC2021-06-22 00:00:00.0003023.52191352553243.292802
    12
    BSC2021-06-23 00:00:00.0005357.19331357853300.482835
    13
    BSC2021-06-24 00:00:00.00081145.91401365953446.392875
    14
    BSC2021-06-25 00:00:00.0008453857.752071450457304.143082
    15
    BSC2021-06-26 00:00:00.000107142.03741461157446.173156
    16
    BSC2021-06-27 00:00:00.00062138.25401467357584.423196
    17
    BSC2021-06-28 00:00:00.0006862.78431474157647.23239
    18
    BSC2021-06-29 00:00:00.0005677.02381479757724.223277
    19
    BSC2021-06-30 00:00:00.0006386.26291486057810.483306
    20
    BSC2021-07-01 00:00:00.0003122.78271489157833.263333
    ...
    903
    62KB
    6s