Hessishlka - dex swaps ovr
    Updated 2025-01-27
    with
    prices_major as
    (SELECT date_trunc('day',hour) as day, avg(close) as pr, case
    when ASSET_ID = 'ethereum' then 'ETH'
    when ASSET_ID = 'usd-coin' then 'USDC'
    when ASSET_ID = 'solana' then 'SOL'
    end as Eclipse_cr
    from crosschain.price.fact_prices_ohlc_hourly
    where hour::date >= '2024-10-01' and
    ASSET_ID in ('ethereum', 'solana', 'usd-coin')
    and PROVIDER = 'coingecko'
    GROUP by all),

    teth_side_sell as
    (select case
    when mint = 'BeRUj3h7BqkbdfFU7FBNYbodgf8GCHodzKvF9aVjNNfL' then 'SOL'
    when mint = 'AKEWE7Bgh87GPp171b4cJPSSZfmZwQ3KaqYqXoKLNAEE' then 'USDC'
    when mint = 'Eth1111111111111111111111111111111111111111' then 'ETH'
    when mint = 'So11111111111111111111111111111111111111112' then 'ETH'
    else mint
    end as token_sell,
    AMOUNT/pow(10,decimal) as volume_sell,
    a.TX_ID as hash,
    SIGNERS[0] as trader,
    a.BLOCK_TIMESTAMP as time
    from eclipse.core.fact_transfers a
    join eclipse.core.fact_transactions b
    on SIGNERS[0]= TX_FROM and a.TX_ID = b.TX_ID
    where MINT = 'AKEWE7Bgh87GPp171b4cJPSSZfmZwQ3KaqYqXoKLNAEE'
    ),

    teth_side_buy as (select
    'tETH' as token_buy,
    AMOUNT/pow(10,decimal) as volume_buy,
    a.TX_ID as hash_buy
    from eclipse.core.fact_transfers a
    Last run: 3 months ago
    DATE
    volume (USD)
    swaps
    TYPE
    DEX
    1
    2025-01-20 00:00:00.0001666.37681444288Buying swapsInvariant
    2
    2024-11-16 00:00:00.00025393.656822062332Buying swapsOrca
    3
    2024-12-09 00:00:00.0002363.83166593596Buying swapsInvariant
    4
    2025-01-17 00:00:00.000120.6319429969Selling swapsInvariant
    5
    2025-01-27 00:00:00.000859.1702434151Selling swapsOrca
    6
    2024-11-17 00:00:00.0001250.60292640892Selling swapsOrca
    7
    2025-01-03 00:00:00.0003485.604174006136Buying swapsInvariant
    8
    2025-01-03 00:00:00.000690.91717434623Selling swapsInvariant
    9
    2024-12-05 00:00:00.000189.19350060610Selling swapsInvariant
    10
    2024-12-14 00:00:00.000214.19839503377Selling swapsInvariant
    11
    2024-11-30 00:00:00.0007538.95613102146Buying swapsOrca
    12
    2025-01-11 00:00:00.000244.4529942421Selling swapsInvariant
    13
    2025-01-24 00:00:00.000211.95250970217Selling swapsInvariant
    14
    2024-12-19 00:00:00.00076.34867510824Selling swapsInvariant
    15
    2024-12-30 00:00:00.0003112.419606246181Buying swapsInvariant
    16
    2024-12-28 00:00:00.000677.35057192338Selling swapsInvariant
    17
    2025-01-24 00:00:00.0003203.367827739315Buying swapsOrca
    18
    2024-11-28 00:00:00.000130.44454640711Selling swapsInvariant
    19
    2024-12-31 00:00:00.000264.27317674736Buying swapsSolar
    20
    2025-01-02 00:00:00.000387.69037918549Buying swapsSolar
    ...
    427
    29KB
    503s