Leetcode 585. 2016年的投资 (partion by 的经典使用)

2021-04-15 10:08:53 浏览数 (1)

代码语言:javascript复制
select round(sum(tiv_2016),2) tiv_2016 from 
    (select *,count(*) over(partition by tiv_2015) a1,count(*) over(partition by lat,lon) a2 from insurance)
    as a
    where a1>1 and a2=1

0 人点赞