mirror of
https://github.com/wesnoth/wesnoth
synced 2025-04-20 19:40:13 +00:00
17 lines
620 B
SQL
17 lines
620 B
SQL
select CLIENT_SOURCE, count(*) as CLIENT_COUNT
|
|
from
|
|
(
|
|
select distinct player.USER_ID, player.CLIENT_SOURCE
|
|
from wesnothd_game_info game, wesnothd_game_player_info player
|
|
where YEAR(game.START_TIME) = YEAR(CURRENT_DATE - INTERVAL 1 MONTH)
|
|
and MONTH(game.START_TIME) = MONTH(CURRENT_DATE - INTERVAL 1 MONTH)
|
|
and game.END_TIME is not NULL
|
|
and TIMESTAMPDIFF(MINUTE, game.START_TIME, game.END_TIME) > 5
|
|
and player.USER_ID != -1
|
|
and game.INSTANCE_UUID = player.INSTANCE_UUID
|
|
and game.GAME_ID = player.GAME_ID
|
|
and player.CLIENT_SOURCE != ''
|
|
) src
|
|
group by CLIENT_SOURCE
|
|
order by COUNT(*) desc
|