Most countries visited
PersonOne step finer than continents: COUNT(DISTINCT competition.country_id). Top 100. Same 8 continental-FMC virtual countries excluded.
Differs from "comps abroad" — this includes home country (home = 1 country), while "abroad" excludes it. A fully-local cuber still has at least 1 country here.
By the numbers
Top 100
Leaderboard depth
Sorted by country count desc
COUNT(DISTINCT)
Aggregate
Distinct `competition.country_id`
排除 8 虚拟国
Filter
Continental-FMC placeholders
Data source
results joined to competitions, 8 virtual countries filtered; GROUP BY person_id, COUNT DISTINCT competition.country_id. Note comp country, not cuber's registered country.
sql
SELECT person_id, COUNT(DISTINCT competition.country_id) visited_countries
FROM results result
JOIN competitions competition ON competition.id = competition_id
WHERE competition.country_id NOT IN
('XA','XE','XF','XM','XN','XO','XS','XW')
GROUP BY person_id
ORDER BY visited_countries DESC
LIMIT 100Algorithm / pipeline
1
Distinct comp countries
competition.country_id is ISO country code; multiple comps in one country count as 1.2
Drop virtual continents
XA/XE/XF/XM/XN/XO/XS/XW are continental-FMC placeholders, not real countries — dropped.
3
Aggregate per person + sort
GROUP BY person_id, COUNT DISTINCT, sort desc, LIMIT 100; outer join persons for names.Caveats & edges
- Home country counts as 1 — complementary to "comps abroad" (abroad = total countries − 1, given you've competed at home).
- No
HAVINGcutoff — straight to top 100; people who've only competed in 1 country naturally drop to the tail. - Comp country is invariant under cuber's country-change events — uses
competition.country_idnotresult.country_id.