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 

转载于:https://www.cnblogs.com/ffeng0312/p/9820374.html

你可能感兴趣的:(585 Investments in 2016)