adriaparcerisasSolana NFT Purchasing Behavior 4
    Updated 2022-04-27
    --Show the distribution of all Solana NFT sales on Solana.
    --What percentage of all sales have been above 1 SOL? Above 10 sol?
    --How many unique wallets have made a NFT purchase that was above 10 SOL? Above 100 SOL?
    WITH
    solana_sales as (
    SELECT
    trunc(block_timestamp,'day') as date,
    max(sales_amount) as high_NFT_price_sale
    from solana.fact_nft_sales
    group by 1
    order by 1 asc
    ),
    ethereum_sales as (
    SELECT
    trunc(block_timestamp,'day') as date,
    max(price_usd) as high_NFT_price_sale
    from ethereum.nft_events
    group by 1
    order by 1 asc
    )
    SELECT
    x.date,
    x.high_NFT_price_sale as "High Solana NFT price sale",
    lag(x.high_NFT_price_sale,1) over (order by x.date) as lasts,
    ((x.high_NFT_price_sale-lasts)/lasts)*100 as "High Solana NFT price sale % growth",
    y.high_NFT_price_sale as "High Ethereum NFT price sale",
    lag(y.high_NFT_price_sale,1) over (order by x.date) as lasts2,
    ((y.high_NFT_price_sale-lasts2)/lasts2)*100 as "High Ethereum NFT price sale % growth"
    from solana_sales x, ethereum_sales y where x.date=y.date
    and x.date >= '2021-12-10'
    order by 1 asc
    Run a query to Download Data