MoDeFiUntitled Query
    Updated 2022-07-19
    with aurory_price as
    (select BLOCK_TIMESTAMP::date as date, avg(price) as price
    from
    (select SWAP_TO_AMOUNT/SWAP_FROM_AMOUNT as price, *
    from solana.core.fact_swaps
    where SWAP_FROM_MINT='AURYydfxJib1ZkTir1Jn1J9ECYUtjb6rKQVmtYaixWPP' and SUCCEEDED=TRUE and SWAP_TO_MINT='EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v'
    and TX_ID!='5pDDppHqj5Fvsc4BvB5CJWqPi7dvPvoyuwf2R8SyDzgZ3Quqbqp6PNuywsG9iBWTSRDtYSZXGKbQ1ramiNs42hmX')
    group by date),

    aurory_nfts as (
    select MINT from solana.core.dim_nft_metadata
    where CONTRACT_NAME='Aurory')

    select *
    from solana.core.fact_nft_sales
    where MINT in (select * from aurory_nfts) and SUCCEEDED=TRUE and BLOCK_TIMESTAMP::date='2022-04-17'
    order by SALES_AMOUNT desc
    limit 123

    Run a query to Download Data