sql题
select t1.dt t1.game_name count(distinct t1.user_id) as vip_Q count(distinct t1.user_id)/count(distinct t2.user_id)*100% from(select user_login.user_id as user_id user_login.dt as dt game_info.game_name as game_name from user_login join vip_user on user_login.user_id=vip_user.user_id user_login join game_user on user_login.user_id= game_user.user_id game_user.game_id=game_info.game_id where vip_user.status=1 vip_user.dt between'2021-01-02'and'2021-03-31' group by user_login.dt game_info.game_name)t1 join(select vip_user.user_id as user_id vip_user.dt as dt game_info.game_name from vip_user join game_user on vip_user.user_id=game_user.user_id game_user join game_info on game_user.game_id = game_info.game_id where vip_user.status=1 vip_user.dt between '2021-01-01'and'2021-03-30' group by dt game_info.game_name)t2 on t1.user_id =t2.user_id and t1.dt= date_add(t2.dt,1) group by t1.dt t1.game_name
#学习路径#