Most completed solves
PersonWCA stores no "completed solves" aggregate — this drilldown hits the result_attempts subtable, counts value > 0 per attempt, then re-aggregates across 6 dimensions (comp / person / country / continent / year / event) for top-20 each.
A GroupedStatistic — one SQL pull, 6 TS regroups. Absolute volume, distinct from comp count or PR count — a MBLD specialist can rack double digits per comp.
By the numbers
6
Dimensions
Comp / person / country / continent / year / event
Top 20
Per-section depth
Each section is independent top 20
`value > 0`
Completed =
DNF (-1) / not-attempted (0) excluded
Data source
Main results joined to result_attempts via correlated subqueries (COUNT WHERE value > 0 and value = -1), plus persons / competitions / countries / continents / events. One SQL pulls per-result completed/dnf; TS regroups by 6 fields.
sql
SELECT (SELECT COUNT(*) FROM result_attempts WHERE result_id = result.id AND value > 0) completed_count, (SELECT COUNT(*) FROM result_attempts WHERE result_id = result.id AND value = -1) dnfs_count, competition_link, person_link, country.name country, continent.name continent, YEAR(competition.start_date) year, event.name event FROM results result JOIN persons person ON wca_id = person_id AND sub_id = 1 JOIN competitions competition ON competition.id = competition_id JOIN countries / continents / events ...
Algorithm / pipeline
1
Per-result attempt count
Correlated subquery rescans
result_attempts per result.id, counting value > 0 (completed) and value = -1 (DNF) separately.2
Carry dimension fields
Same row carries comp link / person link / country / continent / year / event — TS picks one of these as the regrouping key per section.
3
TS regroup × 6
Map<key, {completed, dnfs}>: for each dimension, key = field value;
completed += completed_count, dnfs += dnfs_count.4
Sort + top 20 + bold
Primary sort: completed desc; tiebreak: attempts asc (fewer attempts wins at same completed); final: alpha by key. Completed cell bolded.
Caveats & edges
- MBLD shows as 1-2 attempt rows in
result_attempts, but represents 60+ cubes — this metric counts attempts, so MBLD contributes 1-2 "completed" per comp, not cube count. value > 0covers everything completed regardless of event — FMC scores count as 1 "completed" too.- DNF doesn't subtract but counts in attempts (denominator) — tiebreaker favors fewer DNFs.