MLDZMNLatest trades on $GUAC
    Updated 2023-12-05
    with tb1 as (select
    RECORDED_HOUR::date as day,
    TOKEN_ADDRESS,
    avg (close) as price_token
    from solana.price.ez_token_prices_hourly
    where day>= '2023-08-15'
    group by 1,2)

    SELECT
    distinct tx_id,
    block_timestamp as date,
    SWAPPER,
    SWAP_PROGRAM,
    case when s.SWAP_TO_MINT = 'AZsHEMXd36Bj1EMNXhowJajpUXzrKcK57wW4ZGXVa7yR' then 'Buy $GUAC' else 'Sell $GUAC' end as trade_type,
    price_token*SWAP_FROM_AMOUNT as "Trade volume in USD"
    from solana.defi.fact_swaps s
    left join tb1 b on s.BLOCK_TIMESTAMP::date=b.day and s.SWAP_from_MINT=b.TOKEN_ADDRESS
    where block_timestamp>='2023-08-15'
    and SUCCEEDED = 'TRUE'
    and (s.SWAP_TO_MINT = 'AZsHEMXd36Bj1EMNXhowJajpUXzrKcK57wW4ZGXVa7yR' or s.SWAP_FROM_MINT = 'AZsHEMXd36Bj1EMNXhowJajpUXzrKcK57wW4ZGXVa7yR')
    and price_token*SWAP_FROM_AMOUNT<1e6
    order by date desc
    limit 100




    Run a query to Download Data