• Welcome to the Speedsolving.com, home of the web's largest puzzle community!
    You are currently viewing our forum as a guest which gives you limited access to join discussions and access our other features.

    Registration is fast, simple and absolutely free so please, join our community of 40,000+ people from around the world today!

    If you are already a member, simply login to hide this message and begin participating in the community!

Dumb, random shower thought.

somecuber23

Member
Joined
May 24, 2020
Messages
73
WCA
2021MORI02
Pretty simple, really: When was the last weekend without a single WCA competition occurring worldwide? Considering how ubiquitous WCA competitions are right now, I'm interested to know how far back we need to go to find an answer to this question.

Maybe it'll be wise to have two answers: An answer within the period when COVID was happening, and before that period (so maybe pre-2020).
 
June 12, 2021 was the last weekend without a competition for the first question

Around 2009, competitions became incredibly consistent, with maybe 10 day stretches in between at most. I checked 2010 and 2011 to make sure, and this confirmed my suspicions. The latest one I found manually was August 9-10th, 2008, but I’ll need another source to fact check that there was no skips in 2009
 
Last edited:
June 12, 2021 was the last weekend without a competition for the first question

Around 2009, competitions became incredibly consistent, with maybe 10 day stretches in between at most. I checked 2010 and 2011 to make sure, and this confirmed my suspicions. The latest one I found was August 9-10th, 2008, but I’ll need another source to fact check
Thanks! Did you use WCA Statistic's Database Query for this? If you did, would you mind sharing your query? I've been trying to bodge one for the past 20 minutes.

If you actually did it manually, huge respect to you.
 
Asking ChatGPT

SQL:
WITH RECURSIVE Date_Ranges AS (
  SELECT
    CURDATE() - INTERVAL (WEEKDAY(CURDATE()) + 2) DAY AS weekend_start,  -- Calculate most recent Saturday
    CURDATE() - INTERVAL (WEEKDAY(CURDATE()) + 1) DAY AS weekend_end    -- Calculate most recent Sunday
  UNION ALL
  SELECT
    weekend_start - INTERVAL 7 DAY AS weekend_start,
    weekend_end - INTERVAL 7 DAY AS weekend_end
  FROM Date_Ranges
  WHERE weekend_start > CURDATE() - INTERVAL 1000 WEEK -- Go back 1000 weeks, which is recursion limit
)
SELECT weekend_start, weekend_end
FROM Date_Ranges
WHERE NOT EXISTS (
  SELECT 1 FROM Competitions
  WHERE weekend_start BETWEEN start_date AND end_date
     OR weekend_end BETWEEN start_date AND end_date
)
ORDER BY weekend_start DESC;

weekend_startweekend_end
2021-06-122021-06-13
2021-03-062021-03-07
2021-02-132021-02-14
2009-12-262009-12-27
2009-05-092009-05-10
2009-01-242009-01-25
2009-01-032009-01-04
2008-12-272008-12-28
2008-09-272008-09-28
2008-09-132008-09-14
2008-08-092008-08-10
2008-06-282008-06-29
2008-03-012008-03-02
2008-02-092008-02-10
2008-01-122008-01-13
 
Asking ChatGPT

SQL:
WITH RECURSIVE Date_Ranges AS (
  SELECT
    CURDATE() - INTERVAL (WEEKDAY(CURDATE()) + 2) DAY AS weekend_start,  -- Calculate most recent Saturday
    CURDATE() - INTERVAL (WEEKDAY(CURDATE()) + 1) DAY AS weekend_end    -- Calculate most recent Sunday
  UNION ALL
  SELECT
    weekend_start - INTERVAL 7 DAY AS weekend_start,
    weekend_end - INTERVAL 7 DAY AS weekend_end
  FROM Date_Ranges
  WHERE weekend_start > CURDATE() - INTERVAL 1000 WEEK -- Go back 1000 weeks, which is recursion limit
)
SELECT weekend_start, weekend_end
FROM Date_Ranges
WHERE NOT EXISTS (
  SELECT 1 FROM Competitions
  WHERE weekend_start BETWEEN start_date AND end_date
     OR weekend_end BETWEEN start_date AND end_date
)
ORDER BY weekend_start DESC;

weekend_startweekend_end
2021-06-122021-06-13
2021-03-062021-03-07
2021-02-132021-02-14
2009-12-262009-12-27
2009-05-092009-05-10
2009-01-242009-01-25
2009-01-032009-01-04
2008-12-272008-12-28
2008-09-272008-09-28
2008-09-132008-09-14
2008-08-092008-08-10
2008-06-282008-06-29
2008-03-012008-03-02
2008-02-092008-02-10
2008-01-122008-01-13
Yeah, this looks about right. I think I stopped paying attention when I went through 2009, so I didn’t remember any weekend skips. All the weeks match up, and shows how AI is pretty good
 
Asking ChatGPT

SQL:
WITH RECURSIVE Date_Ranges AS (
  SELECT
    CURDATE() - INTERVAL (WEEKDAY(CURDATE()) + 2) DAY AS weekend_start,  -- Calculate most recent Saturday
    CURDATE() - INTERVAL (WEEKDAY(CURDATE()) + 1) DAY AS weekend_end    -- Calculate most recent Sunday
  UNION ALL
  SELECT
    weekend_start - INTERVAL 7 DAY AS weekend_start,
    weekend_end - INTERVAL 7 DAY AS weekend_end
  FROM Date_Ranges
  WHERE weekend_start > CURDATE() - INTERVAL 1000 WEEK -- Go back 1000 weeks, which is recursion limit
)
SELECT weekend_start, weekend_end
FROM Date_Ranges
WHERE NOT EXISTS (
  SELECT 1 FROM Competitions
  WHERE weekend_start BETWEEN start_date AND end_date
     OR weekend_end BETWEEN start_date AND end_date
)
ORDER BY weekend_start DESC;

weekend_startweekend_end
2021-06-122021-06-13
2021-03-062021-03-07
2021-02-132021-02-14
2009-12-262009-12-27
2009-05-092009-05-10
2009-01-242009-01-25
2009-01-032009-01-04
2008-12-272008-12-28
2008-09-272008-09-28
2008-09-132008-09-14
2008-08-092008-08-10
2008-06-282008-06-29
2008-03-012008-03-02
2008-02-092008-02-10
2008-01-122008-01-13
Thanks, you two. Appreciate both of you taking the time to answer quite a frivolous question.
 
Goodness I'm really underusing AI generated prompts aren't I
Every time I've wanted to dig something out of the database I've just been parsing through the giant text file with a python script
Super annoying
Take the opportunity to learn SQL and the ideas of relational databases. It's much more effective for these kinds of tasks.

Most good programmers do programming not because they expect to get paid or get adulation by the public, but because it is fun to program. -- Linus Torvalds
 
Back
Top