Pmisha-bmlMdxmint.collections
    Updated 2022-06-07
    with top as(
    with t1 as (select
    distinct PURCHASER as wl1,
    mint,
    MINT_PRICE
    from flipside_prod_db.solana.fact_nft_mints
    where BLOCK_TIMESTAMP>='2022-01-01'
    and SUCCEEDED='TRUE'
    and MINT_CURRENCY='So11111111111111111111111111111111111111111'
    and purchaser not in (select address from flipside_prod_db.solana.dim_labels where label_type = 'nft')
    ),

    t2 as (select
    mint,
    SALES_AMOUNT

    from flipside_prod_db.solana.fact_nft_sales
    where BLOCK_TIMESTAMP>='2022-01-01'
    and mint in (select mint from t1)
    and SUCCEEDED='TRUE'
    )

    select
    t1.wl1 as users,
    sum(mint_price) as paid_mint,
    sum(SALES_AMOUNT) as vol_sale,
    vol_sale-paid_mint as profit
    from t1 join t2 on t1.mint=t2.mint
    group by 1
    order by 4 desc limit 10)

    select
    distinct s.PURCHASER as minter,
    b.LABEL as NFT_collection,
    count(s.tx_id) as no_mints
    from flipside_prod_db.solana.fact_nft_mints s left join flipside_prod_db.solana.DIM_LABELS b on s.mint=b.ADDRESS
    Run a query to Download Data