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

3,094 answered market questions

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

Buy Limit vs Sell Limit Orders Explained
How often a resting limit was reached, by distance from the prior close (SPY, 2021 to Sep 2026)ranking · 2026-10-05 · 6×3Preview: 6 ranked values, smallest first. A 1% buy limit vs a 1% sell limit: share of SPY sessions reached, by yearranking · 2026-10-05 · 6×3Preview: 6 ranked values, smallest first. The gap a marketable limit crosses: average quoted spread, five names, Sep 15 2026ranking · 2026-10-05 · 5×3Preview: 5 ranked values, largest first. A real quote in motion: Apple's bid and ask by the minute, Sep 15 2026series · 2026-10-05 · 15×4Preview: a 15-point series, ending higher.
How often a resting limit was reached, by distance from the prior close (SPY, 2021 to Sep 2026)

How often a resting limit was reached, by distance from the prior close (SPY, 2021 to Sep 2026)

most recentas of ranking 6×3read in context →
How often a resting limit was reached, by distance from the prior close (SPY, 2021 to Sep 2026) — 6 rows by 3 columns, computed from US exchange, SIP and OPRA data.
limit_distancebuy_limit_touched_pctsell_limit_touched_pct
0.2560.768.8
0.544.148.1
123.222.2
1.512.410.7
25.84.7
31.51.1
the exact SQL behind every number
WITH daily AS
(
    SELECT
        date,
        toFloat64(any(close)) AS close,
        toFloat64(min(low))   AS low,
        toFloat64(max(high))  AS high
    FROM global_markets.stocks_daily_aggs
    WHERE ticker = 'SPY'
      AND date >= '2021-01-01'
      AND date <  '2026-10-01'
    GROUP BY date
),
framed AS
(
    SELECT
        date,
        low,
        high,
        lagInFrame(close, 1) OVER (ORDER BY date ROWS BETWEEN 1 PRECEDING AND CURRENT ROW) AS prior_close
    FROM daily
)
SELECT
    limit_distance,
    round(100 * countIf(low  <= prior_close * (1 - limit_distance / 100)) / count(), 1) AS buy_limit_touched_pct,
    round(100 * countIf(high >= prior_close * (1 + limit_distance / 100)) / count(), 1) AS sell_limit_touched_pct
FROM
(
    SELECT
        low,
        high,
        prior_close,
        arrayJoin([0.25, 0.5, 1.0, 1.5, 2.0, 3.0]) AS limit_distance
    FROM framed
    WHERE prior_close > 0
)
GROUP BY limit_distance
ORDER BY limit_distance
$