document/常用SQL/每月统计查询-国内-不包含游客.sql
2024-06-30 04:47:39 +08:00

33 lines
1014 B
SQL

--国内tv
select count(1) from (
select UserId from CloudPlatFormUserData.dbo.T_User_Login where appid=0 and LoginTime>='2023-09-01' and LoginTime<'2023-10-01'
group by UserId
) t
--国内 tv new
select count(1) from (
select UserId from CloudPlatFormUserData.dbo.T_User_Login where appid=19 and LoginTime>='2023-09-01' and LoginTime<'2023-10-01'
group by UserId
) t
--国内 主包
select count(1) from (
select UserId from CloudPlatFormUserData.dbo.T_User_Login where appid=1 and LoginTime>='2023-09-01' and LoginTime<'2023-10-01' and BossId!='25001'
group by UserId
) t
--国内 既游
select count(1) from (
select UserId from CloudPlatFormUserData.dbo.T_User_Login where appid=3 and LoginTime>='2023-09-01' and LoginTime<'2023-10-01' and BossId!='25001'
group by UserId
) t
--国内 ios
select count(1) from (
select UserId from CloudPlatFormUserData.dbo.T_User_Login where appid=1 and LoginTime>='2023-09-01' and LoginTime<'2023-10-01' and BossId='25001'
group by UserId
) t