STRASMORE/EXPLORE 3,022 QUERIES 22Y EQUITIES · 12Y OPTIONS

3,022 answered market questions

every one with its exact SQL, its result and the date it was computed · free, no signup

Free Stock Market Data API in Python
Trailing 20-session average volume, four household tickers, millions of sharesseries · 2026-10-04 · 4×4Preview: a 4-point series, ending lower. AAPL daily volume and its trailing 20-session average, millions of sharesseries · 2026-10-04 · 34×3Preview: a 16-point series, ending lower.
Trailing 20-session average volume, four household tickers, millions of shares

Trailing 20-session average volume, four household tickers, millions of shares

most recentas of series 4×4read in context →
Trailing 20-session average volume, four household tickers, millions of shares — 4 rows by 4 columns, computed from US exchange, SIP and OPRA data.
tickeravg_20d_millionsfirst_sessionlast_session
NVDA1102026-09-042026-10-02
SPY462026-09-042026-10-02
AAPL42.22026-09-042026-10-02
MSFT21.32026-09-042026-10-02
the exact SQL behind every number
SELECT
    ticker,
    round(avg(vol) / 1e6, 1)   AS avg_20d_millions,
    toString(min(d))           AS first_session,
    toString(max(d))           AS last_session
FROM
(
    SELECT
        ticker,
        d,
        vol,
        row_number() OVER (PARTITION BY ticker ORDER BY d DESC) AS rn
    FROM
    (
        SELECT
            ticker,
            date                    AS d,
            toFloat64(max(volume))  AS vol
        FROM global_markets.stocks_daily_aggs
        WHERE ticker IN ('SPY', 'NVDA', 'AAPL', 'MSFT')
          AND date >= today() - 45
          AND date <  today()
        GROUP BY ticker, date
    )
)
WHERE rn <= 20
GROUP BY ticker
HAVING count() = 20
ORDER BY avg_20d_millions DESC
$