LTirrellNFT Transactions by marketplace daily
    Updated 2023-04-26
    -- forked from NFT Transactions by marketplace weekly @ https://flipsidecrypto.xyz/edit/queries/2b945162-59a9-4ccc-95ee-fca67ac142c4

    -- forked from 3d71d36a-ca9a-4fcf-97a9-802dbbc2b98d
    select
    date_trunc('day', block_timestamp) as week,
    case
    when marketplace ilike '%coral cube%' then 'Coral Cube'
    when marketplace ilike '%magic eden%' then 'Magic Eden'
    when marketplace ilike 'tensorswap' then 'Tensor'
    when marketplace ilike 'solana monkey business marketplace' then 'SMB Marketplace'
    else initcap(marketplace)
    end as marketplace_normalized,
    count(distinct tx_id) as txs,
    count(distinct purchaser) as buyers,
    count(distinct seller) as sellers,
    count(distinct mint) as nfts_sold,
    sum(sales_amount) sol_amount
    from
    solana.core.fact_nft_sales
    where
    week > current_date - 30
    group by
    week,
    marketplace_normalized
    order by week desc


    Run a query to Download Data