Add SQL to list unique users per day per source.
This commit is contained in:
parent
4cae3beea0
commit
0a7ef1edf1
23 changed files with 14 additions and 3 deletions
|
@ -1,4 +1,4 @@
|
|||
select date(START_TIME) as GAME_DATE, count(distinct player.USER_ID) as PLAYER_COUNT
|
||||
select date(game.START_TIME) as GAME_DATE, count(distinct player.USER_ID) as PLAYER_COUNT
|
||||
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)
|
||||
|
@ -7,5 +7,5 @@ where YEAR(game.START_TIME) = YEAR(CURRENT_DATE - INTERVAL 1 MONTH)
|
|||
and game.INSTANCE_UUID = player.INSTANCE_UUID
|
||||
and game.GAME_ID = player.GAME_ID
|
||||
and player.USER_ID != -1
|
||||
group by GAME_DATE
|
||||
order by GAME_DATE
|
||||
group by game.GAME_DATE
|
||||
order by game.GAME_DATE
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
select date(START_TIME) as GAME_DATE, count(distinct player.USER_ID) as PLAYER_COUNT, 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 game.INSTANCE_UUID = player.INSTANCE_UUID
|
||||
and game.GAME_ID = player.GAME_ID
|
||||
and player.USER_ID != -1
|
||||
group by GAME_DATE, player.CLIENT_SOURCE
|
||||
order by GAME_DATE, player.CLIENT_SOURCE
|
Loading…
Add table
Reference in a new issue