pinehearstDEX Trades
    Updated 2024-01-29
    select
    date_trunc('hour', block_timestamp) as DATE,
    CHAIN,
    CASE
    WHEN PLATFORM LIKE '%uniswap%' then PLATFORM ELSE
    SPLIT(PLATFORM,'-')[0]::VARCHAR END as PROJECT,
    count(tx_hash) as COUNT_ALL,
    count(tx_hash)/count(_log_id) as UNIQUE_COUNT_CHECK,
    count(distinct tx_hash) as DISTINCT_TXN_COUNT,
    sum(nvl(amount_in_usd,amount_out_usd)) as SUM_USD_AMOUNT,
    max(nvl(amount_in_usd,amount_out_usd)) as MAX_USD_AMOUNT,
    count(nvl(amount_in_usd,amount_out_usd))/count(tx_hash)*100 as PERCENT_W_USD
    from
    (
    select 'ethereum' as chain, block_timestamp, platform, tx_hash, _log_id, amount_in_usd, amount_out_usd
    from ethereum.defi.ez_dex_swaps where block_timestamp >= DATEADD(HOUR, -72, CURRENT_TIMESTAMP()) union all
    select 'polygon' as chain, block_timestamp, platform, tx_hash, _log_id, amount_in_usd, amount_out_usd
    from polygon.defi.ez_dex_swaps where block_timestamp >= DATEADD(HOUR, -72, CURRENT_TIMESTAMP()) union all
    select 'arbitrum' as chain, block_timestamp, platform, tx_hash, _log_id, amount_in_usd, amount_out_usd
    from arbitrum.defi.ez_dex_swaps where block_timestamp >= DATEADD(HOUR, -72, CURRENT_TIMESTAMP()) union all
    select 'optimism' as chain, block_timestamp, platform, tx_hash, _log_id, amount_in_usd, amount_out_usd
    from optimism.defi.ez_dex_swaps where block_timestamp >= DATEADD(HOUR, -72, CURRENT_TIMESTAMP()) union all
    select 'bsc' as chain, block_timestamp, platform, tx_hash, _log_id, amount_in_usd, amount_out_usd
    from bsc.defi.ez_dex_swaps where block_timestamp >= DATEADD(HOUR, -72, CURRENT_TIMESTAMP()) union all
    select 'base' as chain, block_timestamp, platform, tx_hash, _log_id, amount_in_usd, amount_out_usd
    from base.defi.ez_dex_swaps where block_timestamp >= DATEADD(HOUR, -72, CURRENT_TIMESTAMP()) union all
    select 'avalanche' as chain, block_timestamp, platform, tx_hash, _log_id, amount_in_usd, amount_out_usd
    from avalanche.defi.ez_dex_swaps where block_timestamp >= DATEADD(HOUR, -72, CURRENT_TIMESTAMP())
    )
    group by 1,2,3

    Last run: about 1 year agoAuto-refreshes every 12 hours
    DATE
    CHAIN
    PROJECT
    COUNT_ALL
    UNIQUE_COUNT_CHECK
    DISTINCT_TXN_COUNT
    SUM_USD_AMOUNT
    MAX_USD_AMOUNT
    PERCENT_W_USD
    1
    2024-01-28 22:00:00.000ethereumuniswap-v326861204521085620.96972709.1490.5063
    2
    2024-01-28 23:00:00.000ethereumdodo571472297064.15938766.9256.1404
    3
    2024-01-29 13:00:00.000ethereumuniswap-v328111217729409172.883314133.3578.4063
    4
    2024-01-29 01:00:00.000ethereumcurve70161971837.06167053.0890
    5
    2024-01-29 12:00:00.000ethereumuniswap-v26721157963072490.1439261.8432.7035
    6
    2024-01-29 10:00:00.000ethereumuniswap-v325301187114560882.28631301.7978.2213
    7
    2024-01-29 06:00:00.000ethereumuniswap-v24432138722636260.9657441.3250.6543
    8
    2024-01-28 14:00:00.000ethereumcurve901812125030.15185447.5497.7778
    9
    2024-01-28 19:00:00.000ethereumuniswap-v24869142433980963.83128277.769.5831
    10
    2024-01-28 12:00:00.000ethereumsushiswap1981181306902.2415235.3993.4343
    11
    2024-01-29 05:00:00.000ethereumuniswap-v23617131422249652.5932990.2457.8103
    12
    2024-01-28 20:00:00.000ethereumpancakeswap81176795450.386090.98100
    13
    2024-01-28 09:00:00.000ethereumdodo381386149333.411931545.9639.4737
    14
    2024-01-28 15:00:00.000ethereumcurve901791457555.34220401.8498.8889
    15
    2024-01-28 05:00:00.000ethereumshibaswap2011518517.286003.26100
    16
    2024-01-29 06:00:00.000ethereumshibaswap191152897.23614.4884.2105
    17
    2024-01-27 03:00:00.000ethereumbalancer30129384166.9272381.7996.6667
    18
    2024-01-29 08:00:00.000polygonquickswap3420126373303.55470.864.0936
    19
    2024-01-29 05:00:00.000polygonbalancer25311510
    20
    2024-01-29 13:00:00.000ethereumshibaswap2212126730.315997.79100
    ...
    5435
    412KB
    150s