HosseinUntitled Query
    Updated 2022-12-08
    with prices as (
    select block_timestamp::date as day,
    swap_from_mint as mint,
    median (swap_to_amount/swap_from_amount) as price_usd
    from solana.core.fact_swaps
    where swap_to_mint in ('EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDav','Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB')
    and swap_to_amount > 0
    and swap_from_amount > 0
    and succeeded = 1
    group by 1, 2
    )


    select * from prices
    where day > current_date - 1
    Run a query to Download Data