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

2,170 answered market questions

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

Low P/E Stocks Near 52-Week Lows
Qualifying large caps as the distance band and the P/E ceiling widenranking · 2026-08-22 · 6×3Preview: 6 ranked values, smallest first. Large caps on a trailing P/E under 15, within 10% of a 52-week lowranking · 2026-08-22 · 9×3Preview: 9 ranked values, smallest first. KO month-end close against its trailing 12-month lowseries · 2026-08-22 · 14×4Preview: a 14-point series, ending higher.
Qualifying large caps as the distance band and the P/E ceiling widen

Qualifying large caps as the distance band and the P/E ceiling widen

most recentas of ranking 6×3read in context →
Qualifying large caps as the distance band and the P/E ceiling widen — 6 rows by 3 columns, computed from US exchange, SIP and OPRA data.
distance_bandnames_pe_under_15names_pe_under_25
within 5%112
within 10%937
within 15%2164
within 20%3191
within 25%41116
within 30%45143
the exact SQL behind every number
WITH ratios AS
(
    SELECT
        ticker,
        argMax(price_to_earnings, date) AS pe,
        argMax(market_cap, date)        AS mcap,
        argMax(average_volume, date)    AS adv
    FROM global_markets.stocks_ratios
    WHERE date >= today() - 14
      AND ticker NOT IN ('SPCX')
    GROUP BY ticker
),
band AS
(
    SELECT
        ticker,
        min(low)            AS low_52w,
        argMax(close, date) AS last_close
    FROM global_markets.stocks_daily_aggs
    WHERE date >= today() - 372
      AND ticker NOT IN ('SPCX')
    GROUP BY ticker
),
universe AS
(
    SELECT
        b.ticker                                                   AS ticker,
        toFloat64(b.last_close) / toFloat64(b.low_52w) * 100 - 100 AS pct_above_low,
        r.pe                                                       AS pe
    FROM band AS b
    INNER JOIN ratios AS r ON r.ticker = b.ticker
    WHERE r.mcap >= 10000000000
      AND r.adv >= 1000000
      AND r.pe > 0
      AND b.low_52w > 0
)
SELECT
    concat('within ', toString(cutoff), '%')      AS distance_band,
    countIf(pct_above_low <= cutoff AND pe <= 15) AS names_pe_under_15,
    countIf(pct_above_low <= cutoff AND pe <= 25) AS names_pe_under_25
FROM
(
    SELECT
        pct_above_low,
        pe,
        arrayJoin([5, 10, 15, 20, 25, 30]) AS cutoff
    FROM universe
)
GROUP BY cutoff
ORDER BY cutoff
$