Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit ce02170

Browse files
committed
이예진: [SQL] Investments in 2016_241121
1 parent aacca77 commit ce02170

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
SELECT ROUND(SUM(tiv_2016),2) tiv_2016
2+
FROM (
3+
SELECT
4+
i.pid, i.tiv_2016
5+
FROM Insurance i
6+
INNER JOIN Insurance sub
7+
ON i.tiv_2015 = sub.tiv_2015
8+
AND i.pid != sub.pid
9+
LEFT JOIN (
10+
SELECT pid, lat, lon
11+
FROM Insurance
12+
) exclude
13+
ON i.lat = exclude.lat AND i.lon = exclude.lon AND i.pid != exclude.pid
14+
WHERE exclude.pid IS NULL
15+
GROUP BY i.pid, i.tiv_2016
16+
) SUB;

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /