wesnoth/utils/mp-server/query-scripts/06-count-of-games-in-month.sql
2022-09-03 02:21:37 -05:00

6 lines
263 B
SQL

select count(*) as GAME_COUNT
from wesnothd_game_info
where YEAR(START_TIME) = YEAR(CURRENT_DATE - INTERVAL 1 MONTH)
and MONTH(START_TIME) = MONTH(CURRENT_DATE - INTERVAL 1 MONTH)
and END_TIME is not NULL
and TIMESTAMPDIFF(MINUTE, START_TIME, END_TIME) > 5