Updated 8 days ago


    with merge as (

    ---arbitrum
    SELECT * EXCLUDE version, 'arbitrum' as label from arbitrum.vertex.ez_perp_trades
    WHERE 1=1
    AND block_timestamp::date BETWEEN '{{start_date}}' AND '{{end_date}}'
    AND trader != '0x0000000000000000000000000000000000000000'
    AND subaccount!='0x0000000000000000000000000000000000000000000000000000000000000001'
    UNION ALL
    ---base
    SELECT *, 'base' as label from base.vertex.ez_perp_trades
    WHERE 1=1
    AND block_timestamp::date BETWEEN '{{start_date}}' AND '{{end_date}}'
    AND trader != '0x0000000000000000000000000000000000000000'
    AND subaccount!='0x0000000000000000000000000000000000000000000000000000000000000001'

    UNION ALL
    ---blitz
    SELECT * , 'blitz' as label from blast.blitz.ez_perp_trades
    WHERE 1=1
    AND block_timestamp::date BETWEEN '{{start_date}}' AND '{{end_date}}'
    AND trader != '0x0000000000000000000000000000000000000000'
    AND subaccount!='0x0000000000000000000000000000000000000000000000000000000000000001'

    UNION ALL
    ---mantle
    SELECT * , 'mantle' as label from mantle.vertex.ez_perp_trades
    WHERE 1=1
    AND block_timestamp::date BETWEEN '{{start_date}}' AND '{{end_date}}'
    AND trader != '0x0000000000000000000000000000000000000000'
    AND subaccount!='0x0000000000000000000000000000000000000000000000000000000000000001'
    Last run: 8 days ago
    LABEL
    VOLUME
    1
    BTC-PERP6956607068.48129
    2
    ETH-PERP3783934976.3333
    3
    Others796020816.360079
    4
    SOL-PERP390159972.785407
    5
    XRP-PERP93295440.9720069
    6
    DOGE-PERP83735336.9721543
    7
    LTC-PERP75409471.337038
    8
    WIF-PERP53324629.3102418
    9
    BCH-PERP39602602.8694637
    10
    MKR-PERP39172077.9344182
    10
    298B
    4s