0xaimanRecent Floor Price
    Updated 2023-03-14
    with l as (select address, label from solana.core.dim_labels

    where label ='blocksmith labs' and label_type='nft'),

    k as (select mint, purchaser, block_timestamp as t, sales_amount
    from solana.core.fact_nft_sales
    where SUCCEEDED='TRUE'
    ),

    id as (
    select mint, token_id from solana.core.dim_nft_metadata

    where project_name = 'Blocksmith Labs'

    order by 2

    ),

    fp as (select date(t) as date, min(sales_amount) as floor_price --token_id,
    from id inner join k on id.mint=k.mint
    where sales_amount>0
    group by 1 order by 1),


    avp as (select date(t) as date, avg(sales_amount) as avg_price
    from (select t , token_id, sales_amount --token_id,
    from id inner join k on id.mint=k.mint
    where sales_amount>0
    )
    group by 1 order by 1)

    select fp.date, floor_price as "Floor Price", avg_price as "Average Price"
    from fp inner join avp on fp.date=avp.date

    order by 1 desc

    Run a query to Download Data