Yearly rankings
Yearlyyearly_rankings is the Rankings abstract base specialized to the current calendar year via WHERE YEAR(competition.start_date) = YEAR(CURDATE()) — producing two boards per event ({Single, Average}), top 10 each.
This is the quickest window into "who is dominant this year": who is breaking out, who just dropped sub-X, which events are seeing record clusters. Different from wr_current (all-time WR) — this filter is strictly results that happened in 2026 itself.
By the numbers
Data source
extends the shared Rankings base class with condition = 'WHERE YEAR(competition.start_date) = YEAR(CURDATE())'. Rankings.query() joins results, persons (sub_id = 1), countries, competitions, pulling single / average / attempts / comp / nationality. The "current year" cutoff means the board resets at every January 1st.
SELECT
event_id,
best AS single,
average,
${ATTEMPTS_SUBQUERY} AS attempts,
person.name, person.wca_id,
country.name AS country,
competition.cell_name, competition.id
FROM results result
JOIN persons person ON person.wca_id = person_id AND person.sub_id = 1
JOIN countries country ON country.id = person.country_id
JOIN competitions competition ON competition.id = competition_id
WHERE YEAR(competition.start_date) = YEAR(CURDATE());
-- TS (Rankings.transform):
-- for each event × ('single' | 'average'):
-- filter value > 0
-- sort by SolveTime.compareTo
-- dedupe by person (keep best)
-- slice 0..10Algorithm / pipeline
WHERE YEAR(competition.start_date) = YEAR(CURDATE()) lets through only this year's competition results. The SQL handles the filter once; everything downstream reuses the shared Rankings base.EVENTS_ENTRIES.flatMap expands each event into a [Single, Average] pair (≈ 42 panels total — some events have an empty average panel, e.g. 333mbf).Number(r[type]) > 0 drops DNF / DNS / unattempted. Then SolveTime.compareTo sorts — for BLD-points events the comparator is encapsulated correctly inside SolveTime so the calling code remains uniform.Set<person_link> walks the sorted list and records each solver on first encounter, skipping duplicates. Equivalent to "keep this year's fastest record per person".slice(0, 10). Each row attaches the attempts string ("32.10 33.45 30.20 ...") so viewers can see the composition. One section per (event, type).Caveats & edges
- "Current year" =
YEAR(CURDATE())at build time on the server clock. On New Year the board resets and re-accumulates from zero. sub_id = 1filters alt identities (renames, country changes, multiple WCA IDs in the dump).- BLD multi (
333mbf) has no average, so its Average panel is always empty — and won't render. - Dedupe is "year-best per person", not per-comp or per-round. Even if someone competes 30 times in the year, only their single fastest result appears.