jackguymadlads 1
    Updated 2023-06-24
    with nft_mins as (
    SELECT DISTINCT mint
    FROM solana.core.fact_nft_mints
    WHERE tx_id in (
    select tx_id
    from
    solana.core.fact_transfers
    WHERE
    (
    tx_to = '6Sj47sKP8wpCJ5XfBzFmzKvDk7VdvaXoLDa1KthxD57X'
    or tx_to = '2RtGg6fsFiiF1EQzHqbd66AhW7R5bWeQGpTbv2UMkCdW'
    )
    and mint = 'So11111111111111111111111111111111111111112'
    and amount = 6.9
    and block_timestamp::date > '2023-04-18'
    AND ((
    tx_to = '2RtGg6fsFiiF1EQzHqbd66AhW7R5bWeQGpTbv2UMkCdW'
    and block_timestamp::date < '2023-04-21'
    )
    OR (
    tx_to = '2RtGg6fsFiiF1EQzHqbd66AhW7R5bWeQGpTbv2UMkCdW'
    and block_timestamp::date >= '2023-04-21'
    ))
    )
    ), first_sale as (
    SELECT min(block_timestamp) as fist_sale
    FROM solana.core.fact_nft_sales
    WHERE mint in (SELECT * from nft_mins)
    and block_timestamp > '2022-04-21'
    )

    SELECT
    date_trunc('hour', block_timestamp) as hour,
    count(DISTINCT tx_id) as sales,
    count(DISTINCT PURCHASER) as buyers,
    sum(SALES_AMOUNT * price) as sales_volume_usd,
    Run a query to Download Data