Calculations › Market Breakdown

Show the top 10 stocks by latest trading volume

The query

WITH latest AS (
  SELECT DISTINCT ON (tp.ticketnameid) tp.ticketnameid, tp.price, tp.volume
  FROM ticketprice tp JOIN ticketname tn ON tn.id = tp.ticketnameid
  WHERE tn.tickettype = 'stock'
  ORDER BY tp.ticketnameid, tp.datetime DESC
)
SELECT tn.ticket AS symbol, l.price, l.volume
FROM latest l JOIN ticketname tn ON tn.id = l.ticketnameid
WHERE l.volume IS NOT NULL
ORDER BY l.volume DESC
LIMIT 10;

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

SymbolPriceVolume
PMED.ST 0.00 102140999
INTC 120.17 64481670
NVDA 230.46 59184648
BAC 53.62 36235170
INTRUM.ST 3.02 35258731
NKE 36.07 33390585
MU 1082.78 32321987
AMC 2.73 27316620
SOFI 15.77 27139975
NFLX 68.42 24787283

Live output, first 10 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