STRASMORE/EXPLORE 2,707 QUERIES 22Y EQUITIES · 12Y OPTIONS

2,707 answered market questions

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

What Happens When an ETF Closes
How the tape behaved into the final sessionranking · 2026-09-27 · 5×3Preview: 5 ranked values, smallest first. How long retired listings had traded before their last sessionranking · 2026-09-27 · 5×3Preview: 5 ranked values, smallest first. Listings that printed their final daily bar, by yearranking · 2026-09-27 · 11×2Preview: 11 ranked values, smallest first. Final trading days by month, rolling three yearsseries · 2026-09-27 · 32×3Preview: a 16-point series, ending lower.
How the tape behaved into the final session

How the tape behaved into the final session

most recentas of ranking 5×3read in context →
How the tape behaved into the final session — 5 rows by 3 columns, computed from US exchange, SIP and OPRA data.
wind_down_stagemedian_daily_range_pctmedian_dollar_volume_k
121 to 250 days out2.4970.1
61 to 120 days out2.1272.8
31 to 60 days out1.7682.9
11 to 30 days out1.7689.4
final 10 days2.53112.4
the exact SQL behind every number
WITH retired AS
(
    SELECT
        ticker,
        max(date) AS last_session
    FROM global_markets.stocks_daily_aggs
    WHERE date >= '2018-01-01'
      AND ticker NOT IN ('SPCX')
    GROUP BY ticker
    HAVING max(date) >= today() - 1130
       AND max(date) <  today() - 250
)
SELECT
    multiIf(
        dateDiff('day', d.date, r.last_session) <= 10,  'final 10 days',
        dateDiff('day', d.date, r.last_session) <= 30,  '11 to 30 days out',
        dateDiff('day', d.date, r.last_session) <= 60,  '31 to 60 days out',
        dateDiff('day', d.date, r.last_session) <= 120, '61 to 120 days out',
                                                        '121 to 250 days out')        AS wind_down_stage,
    round(quantileDeterministic(0.5)(
        toFloat64(d.high - d.low) / toFloat64(d.close) * 100,
        cityHash64(d.ticker, d.date)), 2)                                             AS median_daily_range_pct,
    round(quantileDeterministic(0.5)(
        toFloat64(d.volume) * toFloat64(d.close) / 1000,
        cityHash64(d.ticker, d.date)), 1)                                             AS median_dollar_volume_k
FROM global_markets.stocks_daily_aggs AS d
INNER JOIN retired AS r ON r.ticker = d.ticker
WHERE d.date >= today() - 1500
  AND d.date >  r.last_session - 250
  AND d.date <= r.last_session
  AND d.close > 0
GROUP BY wind_down_stage
ORDER BY min(dateDiff('day', d.date, r.last_session)) DESC
$