TheDubDubJr
Cupcake
post number, post id, member id (0 means guest), member name
blah blah data
It would be interesting to see thread stats for the Accomplishment Thread also.
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.

post number, post id, member id (0 means guest), member name
blah blah data
It would be interesting to see thread stats for the Accomplishment Thread also.
Sorry, I probably won't. That one dwarfs the two I did, and I don't have access to the database but wrote a little "crawler" and analyzer. It's largely automatic but it does need a little attention and it's a slow and bad method. I'd like to see similar stats as well (like highest number of posts by one person in one thread), but they should be done properly with access to the database or at least some export. Maybe Pat could be convinced to make something like a list of (threadId, postId, memberId) triples available...
Who has the most solves (all events combined) without DNFing or DNSing?
I was not able to create a table like Stefan.
What do you mean? Your tables look pretty much like mine.
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>query data</title>
<style type="text/css"> <!--
.normal { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; font-weight: normal; color: #000000}
.medium { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 15px; font-weight: bold; color: #000000; text-decoration: none}
--></style>
</head>
<body>
<h3>query result</h3><table border=1>
<tr>
<td bgcolor=silver class='medium'>NAME</td><td bgcolor=silver class='medium'>Solves</td><td bgcolor=silver class='medium'>DNS</td><td bgcolor=silver class='medium'>DNF</td></tr>
<tr>
<td class='normal' valign='top'>Zhinan Jiang (江志楠)</td>
<td class='normal' valign='top'>66</td>
<td class='normal' valign='top'>4</td>
<td class='normal' valign='top'>0</td>
</tr>
</table>
</body></html>
[table="width: 500"]
[tr]
[td][/td]
[/tr]
[/table
No.Are there any countries that appear in the top 10 of every official result?
Stefan, do you use only SQL export to post table here? Also in some stats when you click on someone's name you can see his WCA profile, how did you do that?
It's explained in this thread: http://www.speedsolving.com/forum/showthread.php?49120-WCA-forum-statistics-tool
contain the results nicely formatted and documented, ready to copy&paste into the forum
How about pairs of competitors with different nationalities? I think this could be more interesting![]()
CREATE TABLE participations
SELECT distinct Results.personId, personCountryId, competitionId
FROM Results
WHERE personId in (SELECT personId FROM Results GROUP BY personId HAVING count(distinct competitionId)>=30);
SELECT a.personId, b.personId, count(*) competitions
FROM participations a, participations b
WHERE a.competitionId=b.competitionId and a.personId<b.personId and a.personCountryId<>b.personCountryId
GROUP BY a.personId, b.personId
HAVING competitions>=30
ORDER BY competitions desc;
DROP TABLE participations;
Best pair in USA is Shelley+Lucas.
SELECT personId Ambassador, personCountryId Country, count(distinct competitionId) Competitions
FROM Results join Competitions on Competitions.id=competitionId
WHERE personCountryId<>'USA' and Competitions.countryId='USA'
GROUP BY personId, personCountryId
HAVING Competitions >= 5
ORDER BY Competitions desc;
when I try to export query result from SQL in HTML
Edit: I guess such additional functionality could be implemented in MySQL as functions and if not automatically, then one could at least apply them explicitly like maybe "link(personId)" instead of "personId". I'll put that on my todo-list for alternatives.
[COLOR="#FF0000"][B]CREATE FUNCTION link[/B][/COLOR] (personId text) RETURNS text
RETURN concat('[noparse][url=https://www.worldcubeassociation.org/results/p.php?i=', personId, ']',
(SELECT name from Persons WHERE id=personId and subId=1),
'[/url][/noparse]');
[COLOR="#FF0000"][B]CREATE FUNCTION format_time[/B][/COLOR] (centiseconds int) RETURNS text
RETURN if(centiseconds < 6000, round(centiseconds/100, 2), 'todo...');
SELECT [COLOR="#FF0000"][B]link(personId)[/B][/COLOR] Cuber, [COLOR="#FF0000"][B]format_time(best)[/B][/COLOR] Record
FROM RanksSingle join Persons on Persons.id=personId
WHERE eventId = '333bf' and countryId = 'Italy'
ORDER BY best
LIMIT 10;
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>Data</title>
</head>
<body>
<table border=1>
<tr>
<td bgcolor=silver class='medium'>Cuber</td>
<td bgcolor=silver class='medium'>Record</td>
</tr>
<tr>
<td class='normal' valign='top'>[url=https://www.worldcubeassociation.org/results/p.php?i=2013SOLI02]Alessandro Solito[/url]</td>
<td class='normal' valign='top'>25.44</td>
</tr>
<tr>
<td class='normal' valign='top'>[url=https://www.worldcubeassociation.org/results/p.php?i=2011TRON02]Sebastiano Tronto[/url]</td>
<td class='normal' valign='top'>27.06</td>
</tr>
<tr>
<td class='normal' valign='top'>[url=https://www.worldcubeassociation.org/results/p.php?i=2009COLO03]Matteo Colombo[/url]</td>
<td class='normal' valign='top'>38.28</td>
</tr>
<tr>
<td class='normal' valign='top'>[url=https://www.worldcubeassociation.org/results/p.php?i=2011MONT02]Kevin Montano[/url]</td>
<td class='normal' valign='top'>53.08</td>
</tr>
<tr>
<td class='normal' valign='top'>[url=https://www.worldcubeassociation.org/results/p.php?i=2009LEVR01]Marco Levrero[/url]</td>
<td class='normal' valign='top'>todo...</td>
</tr>
<tr>
<td class='normal' valign='top'>[url=https://www.worldcubeassociation.org/results/p.php?i=2009DIMP01]Mariano D'Imperio[/url]</td>
<td class='normal' valign='top'>todo...</td>
</tr>
<tr>
<td class='normal' valign='top'>[url=https://www.worldcubeassociation.org/results/p.php?i=2010MAZZ02]Marco Mazzuoccolo[/url]</td>
<td class='normal' valign='top'>todo...</td>
</tr>
<tr>
<td class='normal' valign='top'>[url=https://www.worldcubeassociation.org/results/p.php?i=2008CIRN01]Fabrizio Cirnigliaro[/url]</td>
<td class='normal' valign='top'>todo...</td>
</tr>
<tr>
<td class='normal' valign='top'>[url=https://www.worldcubeassociation.org/results/p.php?i=2009BOSI01]Alberto Bosia[/url]</td>
<td class='normal' valign='top'>todo...</td>
</tr>
<tr>
<td class='normal' valign='top'>[url=https://www.worldcubeassociation.org/results/p.php?i=2007POLI01]Lorenzo Vigani Poli[/url]</td>
<td class='normal' valign='top'>todo...</td>
</tr>
</table>
</body></html>
-- Person name
CREATE FUNCTION pn (personId text) RETURNS text
RETURN (SELECT name from Persons WHERE id=personId and subId=1);
-- Competition name
CREATE FUNCTION cn (competitionId text) RETURNS text
RETURN (SELECT cellName from Competitions WHERE id=competitionId);
-- Format time
CREATE FUNCTION ft (centiseconds int) RETURNS text
RETURN if(centiseconds < 6000,
round(centiseconds/100, 2),
if(centiseconds < 60*6000,
concat(floor(centiseconds/6000), ':', lpad(round(mod(centiseconds, 6000)/100, 2), 5, '0')),
'hours? really?'));
-- Format (ratio as) percentage
CREATE FUNCTION fp (ratio double, digits int) RETURNS text
RETURN concat(round(ratio * 100, digits), '%');
-- Demo
SELECT pn('2003POCH01'), cn('WC2013'), ft(6227), fp(17/42, 2);
Results in:
+------------------+-------------------------+----------+--------------+
| pn('2003POCH01') | cn('WC2013') | ft(6227) | fp(17/42, 2) |
+------------------+-------------------------+----------+--------------+
| Stefan Pochmann | World Championship 2013 | 1:02.27 | 40.48% |
+------------------+-------------------------+----------+--------------+
if Scotland gains independence from the UK, how will that change the NR situation in the British Isles?
My guess is that all results will stay as UK results (including current NRs set by Scots). Then whoever has Scottish nationality will start setting results ranked under Scotland.if Scotland gains independence from the UK, how will that change the NR situation in the British Isles?