Skip to content

Commit 6366074

Browse files
committed
TCO to include Anemoi Challenges
1 parent a2c4140 commit 6366074

File tree

1 file changed

+114
-16
lines changed

1 file changed

+114
-16
lines changed

tco_setup/tco19_eligible_contests.sql

Lines changed: 114 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,13 @@ LEFT OUTER JOIN project_info pi1 ON pi1.project_id = p.project_id and pi1.proj
1919
WHERE p.project_status_id = 1
2020
and p.project_category_id in (7,14,39) -- exclude UI Prototype track as well
2121
and p.project_id not in (select project_id from contest_project_xref where contest_id in (673, 583)) -- make sure we exclude from tco
22-
and p.project_id not in (select ce.contest_id from contest_eligibility ce)
22+
and p.project_id not in
23+
( SELECT contest_id FROM contest_eligibility
24+
WHERE contest_id NOT IN
25+
(select contest_id from contest_eligibility ce inner join common_oltp:group_contest_eligibility gce
26+
ON ce.contest_eligibility_id = gce.contest_eligibility_id
27+
AND group_id = 20000002)
28+
) -- include challenges from Anemoi
2329
and NVL(pi82.value, 0) = 0 -- No TCO if these are tasks
2430
and p.tc_direct_project_id not in (8943, 16411, 16412, 16413, 16406, 16399, 16407) -- exclude projects for fun and university challenges
2531
and p.project_id not in (30070720, 30070724, 30070725, 30070727) -- IBM Hackathon Challenges to be excluded
@@ -42,7 +48,13 @@ LEFT OUTER JOIN project_info pi1 ON pi1.project_id = p.project_id and pi1.proj
4248
WHERE p.project_status_id = 1
4349
and p.project_category_id in (7,14,39) -- exclude UI Prototype track as well
4450
and p.project_id not in (select project_id from contest_project_xref where contest_id in (674, 583)) -- make sure we exclude from tco
45-
and p.project_id not in (select ce.contest_id from contest_eligibility ce)
51+
and p.project_id not in
52+
( SELECT contest_id FROM contest_eligibility
53+
WHERE contest_id NOT IN
54+
(select contest_id from contest_eligibility ce inner join common_oltp:group_contest_eligibility gce
55+
ON ce.contest_eligibility_id = gce.contest_eligibility_id
56+
AND group_id = 20000002)
57+
) -- include challenges from Anemoi
4658
and NVL(pi82.value, 0) = 0 -- No TCO if these are tasks
4759
and p.tc_direct_project_id not in (8943, 16411, 16412, 16413, 16406, 16399, 16407) -- exclude projects for fun and university challenges
4860
-- and mod(p.project_id, 2) = 0
@@ -65,7 +77,13 @@ LEFT OUTER JOIN project_info pi1 ON pi1.project_id = p.project_id and pi1.proj
6577
WHERE p.project_status_id = 1
6678
and p.project_category_id in (7,14,39) -- exclude UI Prototype track as well
6779
and p.project_id not in (select project_id from contest_project_xref where contest_id in (675, 583)) -- make sure we exclude from tco
68-
and p.project_id not in (select ce.contest_id from contest_eligibility ce)
80+
and p.project_id not in
81+
( SELECT contest_id FROM contest_eligibility
82+
WHERE contest_id NOT IN
83+
(select contest_id from contest_eligibility ce inner join common_oltp:group_contest_eligibility gce
84+
ON ce.contest_eligibility_id = gce.contest_eligibility_id
85+
AND group_id = 20000002)
86+
) -- include challenges from Anemoi
6987
and NVL(pi82.value, 0) = 0 -- No TCO if these are tasks
7088
and p.tc_direct_project_id not in (8943, 16411, 16412, 16413, 16406, 16399, 16407) -- exclude projects for fun and university challenges
7189
-- and mod(p.project_id, 2) = 0
@@ -87,7 +105,13 @@ LEFT OUTER JOIN project_info pi1 ON pi1.project_id = p.project_id and pi1.proj
87105
WHERE p.project_status_id = 1
88106
and p.project_category_id in (7,14,39) -- exclude UI Prototype track as well
89107
and p.project_id not in (select project_id from contest_project_xref where contest_id in (676, 583)) -- make sure we exclude from tco
90-
and p.project_id not in (select ce.contest_id from contest_eligibility ce)
108+
and p.project_id not in
109+
( SELECT contest_id FROM contest_eligibility
110+
WHERE contest_id NOT IN
111+
(select contest_id from contest_eligibility ce inner join common_oltp:group_contest_eligibility gce
112+
ON ce.contest_eligibility_id = gce.contest_eligibility_id
113+
AND group_id = 20000002)
114+
) -- include challenges from Anemoi
91115
and NVL(pi82.value, 0) = 0 -- No TCO if these are tasks
92116
and p.tc_direct_project_id not in (8943, 16411, 16412, 16413, 16406, 16399, 16407)-- exclude projects for fun and university challenges
93117
-- and mod(p.project_id, 2) = 0
@@ -120,7 +144,13 @@ WHERE p.project_status_id = 1
120144
WHERE comp_vers_id = pi1.value AND technology_type_id = 78) -- if the challlenge is tagged as QA
121145
)
122146
and p.project_id not in (select project_id from contest_project_xref where contest_id in (668, 583)) -- make sure we exclude from tco
123-
and p.project_id not in (select ce.contest_id from contest_eligibility ce)
147+
and p.project_id not in
148+
( SELECT contest_id FROM contest_eligibility
149+
WHERE contest_id NOT IN
150+
(select contest_id from contest_eligibility ce inner join common_oltp:group_contest_eligibility gce
151+
ON ce.contest_eligibility_id = gce.contest_eligibility_id
152+
AND group_id = 20000002)
153+
) -- include challenges from Anemoi
124154
and NVL(pi82.value, 0) = 0 -- No TCO if these are tasks
125155
and p.tc_direct_project_id not in (8943, 16411, 16412, 16413, 16406, 16399, 16407)-- exclude projects for fun and university challenges
126156
-- and mod(p.project_id, 2) = 0
@@ -148,7 +178,14 @@ WHERE p.project_status_id = 1
148178
WHERE comp_vers_id = pi1.value AND technology_type_id = 78) -- if the challlenge is tagged as QA
149179
)
150180
and p.project_id not in (select project_id from contest_project_xref where contest_id in (669, 583)) -- make sure we exclude from tco
151-
and p.project_id not in (select ce.contest_id from contest_eligibility ce)
181+
and p.project_id not in
182+
( SELECT contest_id FROM contest_eligibility
183+
WHERE contest_id NOT IN
184+
(select contest_id from contest_eligibility ce inner join common_oltp:group_contest_eligibility gce
185+
ON ce.contest_eligibility_id = gce.contest_eligibility_id
186+
AND group_id = 20000002)
187+
) -- include challenges from Anemoi
188+
152189
and NVL(pi82.value, 0) = 0 -- No TCO if these are tasks
153190
and p.tc_direct_project_id not in (8943, 16411, 16412, 16413, 16406, 16399, 16407)-- exclude projects for fun and university challenges
154191
-- and mod(p.project_id, 2) = 0
@@ -176,7 +213,14 @@ WHERE p.project_status_id = 1
176213
WHERE comp_vers_id = pi1.value AND technology_type_id = 78) -- if the challlenge is tagged as QA
177214
)
178215
and p.project_id not in (select project_id from contest_project_xref where contest_id in (670, 583)) -- make sure we exclude from tco
179-
and p.project_id not in (select ce.contest_id from contest_eligibility ce)
216+
and p.project_id not in
217+
( SELECT contest_id FROM contest_eligibility
218+
WHERE contest_id NOT IN
219+
(select contest_id from contest_eligibility ce inner join common_oltp:group_contest_eligibility gce
220+
ON ce.contest_eligibility_id = gce.contest_eligibility_id
221+
AND group_id = 20000002)
222+
) -- include challenges from Anemoi
223+
180224
and NVL(pi82.value, 0) = 0 -- No TCO if these are tasks
181225
and p.tc_direct_project_id not in (8943, 16411, 16412, 16413, 16406, 16399, 16407)-- exclude projects for fun and university challenges
182226
-- and mod(p.project_id, 2) = 0
@@ -204,7 +248,13 @@ WHERE p.project_status_id = 1
204248
WHERE comp_vers_id = pi1.value AND technology_type_id = 78) -- if the challlenge is tagged as QA
205249
)
206250
and p.project_id not in (select project_id from contest_project_xref where contest_id in (671, 583)) -- make sure we exclude from tco
207-
and p.project_id not in (select ce.contest_id from contest_eligibility ce)
251+
and p.project_id not in
252+
( SELECT contest_id FROM contest_eligibility
253+
WHERE contest_id NOT IN
254+
(select contest_id from contest_eligibility ce inner join common_oltp:group_contest_eligibility gce
255+
ON ce.contest_eligibility_id = gce.contest_eligibility_id
256+
AND group_id = 20000002)
257+
) -- include challenges from Anemoi
208258
and NVL(pi82.value, 0) = 0 -- No TCO if these are tasks
209259
and p.tc_direct_project_id not in (8943, 16411, 16412, 16413, 16406, 16399, 16407)-- exclude projects for fun and university challenges
210260
-- and mod(p.project_id, 2) = 0
@@ -226,7 +276,13 @@ LEFT OUTER JOIN project_info pi82 ON pi82.project_id = p.project_id and pi82.pro
226276
WHERE p.project_status_id = 1
227277
and p.project_category_id in (16, 17, 20, 21, 30, 32, 34)
228278
and p.project_id not in (select project_id from contest_project_xref where contest_id in (663, 583)) -- make sure we exclude from tco
229-
and p.project_id not in (select ce.contest_id from contest_eligibility ce)
279+
and p.project_id not in
280+
( SELECT contest_id FROM contest_eligibility
281+
WHERE contest_id NOT IN
282+
(select contest_id from contest_eligibility ce inner join common_oltp:group_contest_eligibility gce
283+
ON ce.contest_eligibility_id = gce.contest_eligibility_id
284+
AND group_id = 20000002)
285+
) -- include challenges from Anemoi
230286
and NVL(pi82.value, 0) = 0 -- No TCO if these are tasks
231287
and p.tc_direct_project_id not in (8943, 16411, 16412, 16413, 16406, 16399, 16407)-- exclude projects for fun and university challenges
232288
-- and mod(p.project_id, 2) = 0
@@ -244,7 +300,13 @@ LEFT OUTER JOIN project_info pi82 ON pi82.project_id = p.project_id and pi82.pro
244300
WHERE p.project_status_id = 1
245301
and p.project_category_id in (16, 17, 20, 21, 30, 32, 34)
246302
and p.project_id not in (select project_id from contest_project_xref where contest_id in (664, 583)) -- make sure we exclude from tco
247-
and p.project_id not in (select ce.contest_id from contest_eligibility ce)
303+
and p.project_id not in
304+
( SELECT contest_id FROM contest_eligibility
305+
WHERE contest_id NOT IN
306+
(select contest_id from contest_eligibility ce inner join common_oltp:group_contest_eligibility gce
307+
ON ce.contest_eligibility_id = gce.contest_eligibility_id
308+
AND group_id = 20000002)
309+
) -- include challenges from Anemoi
248310
and NVL(pi82.value, 0) = 0 -- No TCO if these are tasks
249311
and p.tc_direct_project_id not in (8943, 16411, 16412, 16413, 16406, 16399, 16407)-- exclude projects for fun and university challenges
250312
-- and mod(p.project_id, 2) = 0
@@ -262,7 +324,13 @@ LEFT OUTER JOIN project_info pi82 ON pi82.project_id = p.project_id and pi82.pro
262324
WHERE p.project_status_id = 1
263325
and p.project_category_id in (16, 17, 20, 21, 30, 32, 34)
264326
and p.project_id not in (select project_id from contest_project_xref where contest_id in (665, 583)) -- make sure we exclude from tco
265-
and p.project_id not in (select ce.contest_id from contest_eligibility ce)
327+
and p.project_id not in
328+
( SELECT contest_id FROM contest_eligibility
329+
WHERE contest_id NOT IN
330+
(select contest_id from contest_eligibility ce inner join common_oltp:group_contest_eligibility gce
331+
ON ce.contest_eligibility_id = gce.contest_eligibility_id
332+
AND group_id = 20000002)
333+
) -- include challenges from Anemoi
266334
and NVL(pi82.value, 0) = 0 -- No TCO if these are tasks
267335
and p.tc_direct_project_id not in (8943, 16411, 16412, 16413, 16406, 16399, 16407)-- exclude projects for fun and university challenges
268336
-- and mod(p.project_id, 2) = 0
@@ -282,7 +350,13 @@ LEFT OUTER JOIN project_info pi82 ON pi82.project_id = p.project_id and pi82.pro
282350
WHERE p.project_status_id = 1
283351
and p.project_category_id in (16, 17, 20, 21, 30, 32, 34)
284352
and p.project_id not in (select project_id from contest_project_xref where contest_id in (666, 583)) -- make sure we exclude from tco
285-
and p.project_id not in (select ce.contest_id from contest_eligibility ce)
353+
and p.project_id not in
354+
( SELECT contest_id FROM contest_eligibility
355+
WHERE contest_id NOT IN
356+
(select contest_id from contest_eligibility ce inner join common_oltp:group_contest_eligibility gce
357+
ON ce.contest_eligibility_id = gce.contest_eligibility_id
358+
AND group_id = 20000002)
359+
) -- include challenges from Anemoi
286360
and NVL(pi82.value, 0) = 0 -- No TCO if these are tasks
287361
and p.tc_direct_project_id not in (8943, 16411, 16412, 16413, 16406, 16399, 16407) -- exclude projects for fun and university challenges
288362
--and mod(p.project_id, 2) = 0
@@ -303,7 +377,13 @@ LEFT OUTER JOIN project_info pi82 ON pi82.project_id = p.project_id and pi82.pro
303377
WHERE p.project_status_id = 1
304378
and p.project_category_id in (38,40)
305379
and p.project_id not in (select project_id from contest_project_xref where contest_id in (658, 583)) -- make sure we exclude from tco
306-
and p.project_id not in (select ce.contest_id from contest_eligibility ce)
380+
and p.project_id not in
381+
( SELECT contest_id FROM contest_eligibility
382+
WHERE contest_id NOT IN
383+
(select contest_id from contest_eligibility ce inner join common_oltp:group_contest_eligibility gce
384+
ON ce.contest_eligibility_id = gce.contest_eligibility_id
385+
AND group_id = 20000002)
386+
) -- include challenges from Anemoi
307387
and NVL(pi82.value, 0) = 0 -- No TCO if these are tasks
308388
and p.tc_direct_project_id not in (8943, 16411, 16412, 16413, 16406, 16399, 16407)-- exclude projects for fun and university challenges
309389
-- and mod(p.project_id, 2) = 0
@@ -321,7 +401,13 @@ LEFT OUTER JOIN project_info pi82 ON pi82.project_id = p.project_id and pi82.pro
321401
WHERE p.project_status_id = 1
322402
and p.project_category_id in (38,40)
323403
and p.project_id not in (select project_id from contest_project_xref where contest_id in (659, 583)) -- make sure we exclude from tco
324-
and p.project_id not in (select ce.contest_id from contest_eligibility ce)
404+
and p.project_id not in
405+
( SELECT contest_id FROM contest_eligibility
406+
WHERE contest_id NOT IN
407+
(select contest_id from contest_eligibility ce inner join common_oltp:group_contest_eligibility gce
408+
ON ce.contest_eligibility_id = gce.contest_eligibility_id
409+
AND group_id = 20000002)
410+
) -- include challenges from Anemoi
325411
and NVL(pi82.value, 0) = 0 -- No TCO if these are tasks
326412
and p.tc_direct_project_id not in (16411, 16412, 16413, 16406, 16399, 16407)-- exclude projects for fun and university challenges
327413
-- and mod(p.project_id, 2) = 0
@@ -339,7 +425,13 @@ LEFT OUTER JOIN project_info pi82 ON pi82.project_id = p.project_id and pi82.pro
339425
WHERE p.project_status_id = 1
340426
and p.project_category_id in (38,40)
341427
and p.project_id not in (select project_id from contest_project_xref where contest_id in (660, 583)) -- make sure we exclude from tco
342-
and p.project_id not in (select ce.contest_id from contest_eligibility ce)
428+
and p.project_id not in
429+
( SELECT contest_id FROM contest_eligibility
430+
WHERE contest_id NOT IN
431+
(select contest_id from contest_eligibility ce inner join common_oltp:group_contest_eligibility gce
432+
ON ce.contest_eligibility_id = gce.contest_eligibility_id
433+
AND group_id = 20000002)
434+
) -- include challenges from Anemoi
343435
and NVL(pi82.value, 0) = 0 -- No TCO if these are tasks
344436
and p.tc_direct_project_id not in (8943, 16411, 16412, 16413, 16406, 16399, 16407)-- exclude projects for fun and university challenges
345437
-- and mod(p.project_id, 2) = 0
@@ -357,7 +449,13 @@ LEFT OUTER JOIN project_info pi82 ON pi82.project_id = p.project_id and pi82.pro
357449
WHERE p.project_status_id = 1
358450
and p.project_category_id in (38,40)
359451
and p.project_id not in (select project_id from contest_project_xref where contest_id in (661, 583)) -- make sure we exclude from tco
360-
and p.project_id not in (select ce.contest_id from contest_eligibility ce)
452+
and p.project_id not in
453+
( SELECT contest_id FROM contest_eligibility
454+
WHERE contest_id NOT IN
455+
(select contest_id from contest_eligibility ce inner join common_oltp:group_contest_eligibility gce
456+
ON ce.contest_eligibility_id = gce.contest_eligibility_id
457+
AND group_id = 20000002)
458+
) -- include challenges from Anemoi
361459
and NVL(pi82.value, 0) = 0 -- No TCO if these are tasks
362460
and mod(p.project_id, 2) = 0
363461
and p.tc_direct_project_id not in (8943, 16411, 16412, 16413, 16406, 16399, 16407) --exclude projects for fun and university challenges

0 commit comments

Comments
 (0)