Hessishlaika - xmas buy all
    Updated 2024-12-27
    with
    buy_trades as
    (with 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'
    when mint = 'GU7NS9xCwgNPiAdJ69iusFrRfawjDDPjeMBovhV1d4kn' then 'tETH'
    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 a.tx_to not in ('D4P9HJYPczLFHvxBgpLKooy7eWczci8pr4x9Zu7iYCVN','7nuPtH4c7BJUbfyGvRYQYBqZpPf81SHCJxPuMSYXtC6i')
    ),

    side_buy as (select
    'laika' as token_buy,
    AMOUNT/pow(10,decimal) as volume_buy,
    a.TX_ID as hash_buy
    from eclipse.core.fact_transfers a
    join eclipse.core.fact_transactions b
    on SIGNERS[0]= TX_to and a.TX_ID = b.TX_ID
    where --a.tx_id = '4uziMk6MahPkedQc7ppm9YAXN5uFGyZ8zCekvbFP9kX85ob76QSwHPU6v9roH3E4eJVrXZFr5DPP8rkftDkiseY7'
    MINT = 'LaihKXA47apnS599tyEyasY2REfEzBNe4heunANhsMx'
    )

    select
    token_sell, volume_sell,
    token_buy,volume_buy,
    time, hash, trader
    QueryRunArchived: QueryRun has been archived