Shortest time to get all singles
PersonCubers who got a valid single in every current official event, sorted by time-to-completion. Subquery filters retired events via events.rank < 900, then COUNT(DISTINCT event_id) = (SELECT COUNT(*) FROM events WHERE rank<900) locks candidates.
Top spots usually finish within a year; the absolute fastest take months, but you need comps that hold rare events (7x7 / FMC / Multi-Blind) — sparse regions just can't close the set.
By the numbers
Data source
Subquery isolates "all-singles" cubers → outer join pulls all their results, finds the earliest best > 0 per (person, event). Last event's completion date minus first comp date = days.
Historical note: using Object.keys(EVENTS).length = 21 (with retired) would never satisfy the HAVING — switched to (SELECT COUNT(*) FROM events WHERE rank<900) subquery to match the SQL filter.
SELECT event_id, person_link, start_date, best
FROM (SELECT person_id FROM results
JOIN events ON events.id = event_id
WHERE rank < 900 AND best > 0
GROUP BY person_id
HAVING COUNT(DISTINCT event_id) =
(SELECT COUNT(*) FROM events WHERE rank<900)) all_events
JOIN results r ON r.person_id = all_events.person_id
JOIN persons person ON wca_id = r.person_id AND sub_id = 1
JOIN competitions ON id = competition_id
ORDER BY start_dateAlgorithm / pipeline
HAVING COUNT(DISTINCT event_id) = (SELECT COUNT(*) FROM events WHERE rank<900) — at least one best > 0 in every current event.start_date ascending guarantees).best > 0 date per event. Last-completed event = max value in the Map.days = floor((lastEventDate − firstDate) / 24h); sort asc, no LIMIT (UI paginates).Caveats & edges
- "First comp" spans all events — if you did OH first then circled back for 3x3 single, the clock starts at the OH comp.
- Only current official events; retired events (old magic / clock-rule, rank ≥ 900) not required.
best > 0excludes DNFs — last-event DNFs don't patch the set, must be a real success.