题解 | 电竞赛事战队近期战绩查询

电竞赛事战队近期战绩查询

https://www.nowcoder.com/practice/7dda27e223a94184a3269ed99ac42fbe

select e.team_name,e.region,b.match_date,b.opponent,b.kills,b.deaths,b.kda_ratio,b.result
from
esports_teams e join lateral
(
select match_date,opponent,kills,deaths,kda_ratio,result
from(
select match_date,opponent,kills,deaths,round(kills/deaths,2) as kda_ratio,
case
when
is_win =1 then '胜' else '负' end as result,
row_number() over (partition by team_id order by team_id,match_date desc,match_id) as rk
from
match_records m
where m.team_id = e.team_id
) a 
where rk <=3
) b on true

全部评论

相关推荐

03-08 18:11
门头沟学院 Java
Java抽象小篮子:海投就完事了,简历没什么问题,最大问题是学历
点赞 评论 收藏
分享
03-23 23:00
黄淮学院 Java
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务