题目链接:点击打开链接
题目大意:略。
解题思路:略。
AC 代码
--解决方案(1) SELECTSUM(insurance.TIV_2016) ASTIV_2016FROMinsuranceWHEREinsurance.TIV_2015IN ( SELECTTIV_2015FROMinsuranceGROUPBYTIV_2015HAVINGCOUNT(*) >1 ) ANDCONCAT(LAT, LON) IN ( SELECTCONCAT(LAT, LON) FROMinsuranceGROUPBYLAT , LONHAVINGCOUNT(*) =1 ) ; --解决方案(2) SELECTROUND(SUM(TIV_2016), 2) TIV_2016FROMinsuranceinsWHERE (SELECTCOUNT(TIV_2015) >0FROMinsuranceWHEREPID<>ins.PIDANDTIV_2015=ins.TIV_2015) AND (SELECTCOUNT(1) =1FROMinsuranceWHERELAT=ins.LATANDLON=ins.LON)