| year | game_count |
|---|---|
| 2025 | 679 |
| 2024 | 907 |
| 2023 | 1020 |
| 2022 | 1013 |
| 2021 | 1112 |
| 2020 | 1003 |
| 2019 | 990 |
| 2018 | 1074 |
| 2017 | 1242 |
| 2016 | 1338 |
| 2015 | 1329 |
| 2014 | 1335 |
| 2013 | 1343 |
| 2012 | 1358 |
| 2011 | 1341 |
| 2010 | 1290 |
| 2009 | 1325 |
| 2008 | 1270 |
| 2007 | 1227 |
| 2006 | 1150 |
| 2005 | 1077 |
| 2004 | 961 |
| 2003 | 901 |
| 2002 | 787 |
| 2001 | 681 |
| 2000 | 682 |
| 1999 | 550 |
| 1998 | 428 |
| 1997 | 295 |
| 1996 | 256 |
| 1995 | 191 |
| 1994 | 141 |
| 1993 | 110 |
| 1992 | 81 |
| 1991 | 71 |
| 1990 | 70 |
| 1989 | 70 |
| 1988 | 46 |
| 1987 | 39 |
| 1986 | 20 |
| 1985 | 14 |
| 1984 | 16 |
| 1983 | 18 |
| 1982 | 2 |
| 1979 | 1 |
WITH latest_per_game AS (
SELECT DISTINCT ON (gamename)
gamename,
game_id,
sellday
FROM toukei_temp_table
WHERE sellday IS NOT NULL
AND sellday <= current_date
ORDER BY gamename, sellday ASC
)
SELECT
EXTRACT(YEAR FROM sellday)::INT AS year,
COUNT(game_id) AS game_count
FROM latest_per_game
GROUP BY year
ORDER BY year DESC;