585 Investments in 2016

https://leetcode.com/articles/investments-in-2016/

select sum(i1.tiv_2016) from insurance i1

where i1.tiv_2015 in

(select t2.tiv_2015 from insurance i2

where i1.pid <> i2.pid)

and (i1.lat,i1.lon) not in

(select i3.lat,i3.lon from insurance i3

where i1.pid <> i3.pid);

insurance 

posted @ 2018-10-20 06:43  ffeng0312  阅读(237)  评论(0编辑  收藏  举报