document/常用SQL/历史/每月统计查询-国内.sql
2024-09-08 22:06:12 +08:00

30 lines
807 B
SQL

select count(1) from (
SELECT UserID FROM MoguExt.dbo.T_Log_Login where CreateTime_Day>=20230801 and CreateTime_Day<20230901 and PlatformType='TV' and UserType>0
and AppId=0
group by userid
) t
select count(1) from (
SELECT UserID FROM MoguExt.dbo.T_Log_Login where CreateTime_Day>=20230801 and CreateTime_Day<20230901 and PlatformType='APP_ANDROID' and UserType>0
and AppId=1
group by userid
) t
select count(1) from (
SELECT UserID FROM MoguExt.dbo.T_Log_Login where CreateTime_Day>=20230801 and CreateTime_Day<20230901 and PlatformType='IOS' and UserType>0
and AppId=1
group by userid
) t
select count(1) from (
select UserId from CloudPlatFormUserData.dbo.T_User_Login where appid=3 and LoginTime>='2023-04-01' and LoginTime<'2023-05-01' and BossID!='25001' group by UserId
) t