一、力扣511. 游戏玩法分析 I
代码如下:
select player_id,min(event_date) as first_login
from activity
group by player_id;
二、力扣512.游戏玩法分析 II
代码如下:
select player_id, device_id
From Activity
where (player_id, event_date) in (select player_id, min(event_date) from Activity group by player_id)
group by player_id;
三、力扣584. 寻找用户推荐人
代码如下:
select name
from customer
where referee_id <> 2 or referee_id is null;
四、力扣595. 大的国家
代码如下:
select name,population,area
from world
where area >=3000000 or population >= 25000000;
五、力扣610. 判断三角形
代码如下:
select x,y,z,
case
when x+y>z and x+z>y and y+z>x then 'Yes'
else 'No'
end as triangle
from triangle;
✨✨✨
冲冲冲