with sub_calc as (select lat ,lonfrom ( select lat , lon , count(*) as cnt from Insurance group by 1,2) as t where cnt = 1) , sub_2015 as ( select tiv_2015 , count(*) as tot from Insurance group by 1 having tot >= 2) select round(sum(tiv_2016) , 2) as tiv_2016from Insurance i join sub_calc s on i.lat = s.lat and i.lon = s.lon where tiv_..