yasmin-n-d-r-hnft compare
    Updated 2022-09-16
    with price as(
    select
    date_trunc('day', block_timestamp) as date1,
    avg(
    swap_to_amount / swap_from_amount
    ) as sol_price
    from
    flipside_prod_db.solana.fact_swaps
    where
    date1 > CURRENT_DATE - 90
    and date1 <= current_date - 1
    and swap_from_amount > 0
    and swap_to_amount > 0
    and swap_from_mint = 'So11111111111111111111111111111111111111112'
    and swap_to_mint = 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v'
    and (
    swap_to_amount / swap_from_amount
    ) > 30
    and (
    swap_to_amount / swap_from_amount
    ) < 100
    group by
    1
    ),
    flow as (
    select
    date_trunc('day', block_timestamp) as date,
    buyer as buyer,
    sum(price) as buy_amount
    from
    flow.core.fact_nft_sales
    where
    date > CURRENT_DATE - 90
    and date <= current_date - 1
    and tx_succeeded = true
    group by
    Run a query to Download Data