mirror of
https://github.com/wesnoth/wesnoth
synced 2025-04-22 16:00:25 +00:00
Add era to faction query.
This commit is contained in:
parent
ecb8e4c587
commit
bc26194e5b
@ -1,13 +1,17 @@
|
||||
select player.FACTION, count(*) as SIDE_COUNT
|
||||
select content.ID, player.FACTION, count(*) as SIDE_COUNT
|
||||
from wesnothd_game_info game
|
||||
inner join wesnothd_game_player_info player
|
||||
on game.INSTANCE_UUID = player.INSTANCE_UUID
|
||||
and game.GAME_ID = player.GAME_ID
|
||||
and player.USER_ID != -1
|
||||
and player.FACTION != ''
|
||||
inner join wesnothd_game_content_info content
|
||||
on game.INSTANCE_UUID = content.INSTANCE_UUID
|
||||
and game.GAME_ID = content.GAME_ID
|
||||
and content.TYPE = 'era'
|
||||
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
|
||||
group by player.FACTION
|
||||
group by content.ID, player.FACTION
|
||||
order by count(*) desc
|
||||
|
Loading…
x
Reference in New Issue
Block a user