LTirrellNFT Transactions by marketplace weekly
    Updated 2024-03-25
    -- forked from 3d71d36a-ca9a-4fcf-97a9-802dbbc2b98d
    select
    date_trunc(week, 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.nft.fact_nft_sales
    where
    week < date_trunc(week, current_date)
    group by
    week,
    marketplace_normalized
    order by week desc
    Auto-refreshes every 3 hours
    QueryRunArchived: QueryRun has been archived