- Published on
Leetcode - 585. Investments in 2016
- Authors
- Name
- Indo Yoon
Table of Contents
문제
[Loading...
Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview.
LeetCode
](https://leetcode.com/problems/investments-in-2016/)
정답
SELECT ROUND(SUM(tiv_2016), 2) AS tiv_2016
FROM Insurance
WHERE pid IN (
SELECT pid
FROM Insurance
GROUP BY lat * 1000 + lon
HAVING COUNT(lat * 1000 + lon) = 1
) AND
tiv_2015 IN (
SELECT tiv_2015
FROM Insurance
GROUP BY tiv_2015
HAVING COUNT(tiv_2015) > 1
)