My friend AJ Nicholls keeps track of how many distinct dates he has competed on, currently 189. He wanted to be able to compare himself with others in the cubing community, and asked me to make a stats page for that.
This PR adds a new statistic most_distinct_dates_competed_on which takes the start and end date of each competition and makes a date range for the days in between, so that every date competed on can be calculated. If you look at the previous commit you will see a version in which those dates are listed as well (I used that to send AJ a list that he could verify against).
I have verified with my own distinct dates and AJ has verified his as well. To make the query run faster I got some help from ChatGPT, and it now runs on my machine in 27 seconds. This explains the weird-looking code in the middle. Feel free to improve upon it if you can!
My friend AJ Nicholls keeps track of how many distinct dates he has competed on, currently 189. He wanted to be able to compare himself with others in the cubing community, and asked me to make a stats page for that.
This PR adds a new statistic
most_distinct_dates_competed_on
which takes the start and end date of each competition and makes a date range for the days in between, so that every date competed on can be calculated. If you look at the previous commit you will see a version in which those dates are listed as well (I used that to send AJ a list that he could verify against).I have verified with my own distinct dates and AJ has verified his as well. To make the query run faster I got some help from ChatGPT, and it now runs on my machine in 27 seconds. This explains the weird-looking code in the middle. Feel free to improve upon it if you can!