Calculations › Market Breakdown

Show how many stocks fall into each market-cap bucket

The query

-- barchart market-wide: count of stocks by market-cap bucket
SELECT
  CASE
    WHEN sm.market_cap IS NULL THEN 'Unknown'
    WHEN sm.market_cap < 2000000000 THEN 'Small Cap (<2B)'
    WHEN sm.market_cap < 10000000000 THEN 'Mid Cap (2B-10B)'
    WHEN sm.market_cap < 200000000000 THEN 'Large Cap (10B-200B)'
    ELSE 'Mega Cap (>200B)'
  END AS market_cap_bucket,
  COUNT(*) AS stock_count
FROM ticketname tn
LEFT JOIN symbolmetadata sm ON sm.ticketnameid = tn.id
WHERE tn.tickettype = 'stock'
GROUP BY 1
ORDER BY stock_count DESC;

Runs against Cryptobi's market tables — ticketname (symbols), ticketprice (daily prices and volume) and symbolmetadata (sector, exchange, market cap and other reference fields).

Current output

Market cap bucketStock count
Large Cap (10B-200B) 178
Small Cap (<2B) 144
Mid Cap (2B-10B) 106
Mega Cap (>200B) 77
Unknown 39

Live output, first 5 rows, refreshed periodically. Model estimates are trend projections from recent prices, not financial advice.

Run this on your own holdings, change it, or write your own in SQL or Python — then put it on a dashboard or have it emailed on a schedule. Free, no credit card.

Sign Up Free

Related calculations