Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a new query to get faction side count.
- Loading branch information
1 parent
790bd02
commit 9b7a958
Showing
15 changed files
with
13 additions
and
0 deletions.
There are no files selected for viewing
13 changes: 13 additions & 0 deletions
13
utils/mp-server/query-scripts/08-factions-by-side-count.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
select 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 != '' | ||
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 | ||
order by count(*) desc |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.