You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
selectactivity.player_id, activity.device_idfrom activity, (
select player_id, min(event_date) as first_login
from activity group by player_id
) as temp
whereactivity.player_id=temp.player_idandactivity.event_date=temp.first_login;
select player_id, device_id from (
select
player_id,
device_id,
dense_rank() over(partition by player_id order by event_date) as 排名
from activity
) as temp where temp.排名 =1;
题目
查找出每一个玩家首次登录的设备名称
SQL:方法一
解析
player_id
最小的event_date
命名为temp
临时表activity
和temp
连查,筛选出player_id
相等,并且activity.event_date = temp.first_login
相等的数据SQL:方法二
解析
这个方法和
游戏玩法分析 I
中的方法二一样。SQL:方法三
解析
使用
all
配合<=
筛选出a1.player_id = a2.player_id
的event_date
数据Tips
all 方法使用
The text was updated successfully, but these errors were encountered: