Skip to content

Commit b099828

Browse files
authored
Merge pull request #32 from topcoder-platform/feature/tco20_contest_script
Updated the tco20_eligible_constest.sql script file to exclude private challenges
2 parents 20ac4a8 + 61ce497 commit b099828

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

tco_setup/tco20_eligible_contests.sql

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,9 @@ WHERE p.project_status_id = 1
2121
and p.project_id not in (select project_id from contest_project_xref where contest_id in (698, 697)) -- make sure we exclude from tco
2222
and NVL(pi82.value, 0) = 0 -- No TCO if these are tasks
2323
and p.tc_direct_project_id not in (8943, 16411, 16412, 16413, 16406, 16399, 16407) -- exclude projects for fun and university challenges
24-
and p.project_id not in (30070720, 30070724, 30070725, 30070727) -- IBM Hackathon Challenges to be excluded
24+
-- and p.project_id not in (30070720, 30070724, 30070725, 30070727) -- IBM Hackathon Challenges to be excluded
2525
-- and mod(p.project_id, 2) = 0
26+
and p.project_id not in (select ce.contest_id from contest_eligibility ce) --excluding private challenges
2627
and not exists (SELECT 1 FROM comp_technology
2728
WHERE comp_vers_id = pi1.value AND technology_type_id = 78) -- exclude QA Challenges from Dev
2829
and 1 = 1;
@@ -44,6 +45,7 @@ WHERE p.project_status_id = 1
4445
and NVL(pi82.value, 0) = 0 -- No TCO if these are tasks
4546
and p.tc_direct_project_id not in (8943, 16411, 16412, 16413, 16406, 16399, 16407) -- exclude projects for fun and university challenges
4647
-- and mod(p.project_id, 2) = 0
48+
and p.project_id not in (select ce.contest_id from contest_eligibility ce) --excluding private challenges
4749
and not exists (SELECT 1 FROM comp_technology
4850
WHERE comp_vers_id = pi1.value AND technology_type_id = 78) -- exclude QA Challenges from Dev
4951
and 1 = 1;
@@ -66,6 +68,7 @@ WHERE p.project_status_id = 1
6668
and NVL(pi82.value, 0) = 0 -- No TCO if these are tasks
6769
and p.tc_direct_project_id not in (8943, 16411, 16412, 16413, 16406, 16399, 16407) -- exclude projects for fun and university challenges
6870
-- and mod(p.project_id, 2) = 0
71+
and p.project_id not in (select ce.contest_id from contest_eligibility ce) --excluding private challenges
6972
and not exists (SELECT 1 FROM comp_technology
7073
WHERE comp_vers_id = pi1.value AND technology_type_id = 78) -- exclude QA Challenges from Dev
7174
and 1 = 1;
@@ -98,6 +101,7 @@ WHERE p.project_status_id = 1
98101
and NVL(pi82.value, 0) = 0 -- No TCO if these are tasks
99102
and p.tc_direct_project_id not in (8943, 16411, 16412, 16413, 16406, 16399, 16407)-- exclude projects for fun and university challenges
100103
-- and mod(p.project_id, 2) = 0
104+
and p.project_id not in (select ce.contest_id from contest_eligibility ce) --excluding private challenges
101105
and 1 = 1;
102106

103107
-- Stage 2
@@ -124,6 +128,7 @@ WHERE p.project_status_id = 1
124128
and NVL(pi82.value, 0) = 0 -- No TCO if these are tasks
125129
and p.tc_direct_project_id not in (8943, 16411, 16412, 16413, 16406, 16399, 16407)-- exclude projects for fun and university challenges
126130
-- and mod(p.project_id, 2) = 0
131+
and p.project_id not in (select ce.contest_id from contest_eligibility ce) --excluding private challenges
127132
and 1 = 1;
128133

129134
-- Stage 3
@@ -151,6 +156,7 @@ WHERE p.project_status_id = 1
151156
and NVL(pi82.value, 0) = 0 -- No TCO if these are tasks
152157
and p.tc_direct_project_id not in (8943, 16411, 16412, 16413, 16406, 16399, 16407)-- exclude projects for fun and university challenges
153158
-- and mod(p.project_id, 2) = 0
159+
and p.project_id not in (select ce.contest_id from contest_eligibility ce) --excluding private challenges
154160
and 1 = 1;
155161

156162

@@ -172,6 +178,7 @@ WHERE p.project_status_id = 1
172178
and NVL(pi82.value, 0) = 0 -- No TCO if these are tasks
173179
and p.tc_direct_project_id not in (8943, 16411, 16412, 16413, 16406, 16399, 16407)-- exclude projects for fun and university challenges
174180
-- and mod(p.project_id, 2) = 0
181+
and p.project_id not in (select ce.contest_id from contest_eligibility ce) --excluding private challenges
175182
and 1 = 1;
176183

177184
-- Stage 2
@@ -189,6 +196,7 @@ WHERE p.project_status_id = 1
189196
and NVL(pi82.value, 0) = 0 -- No TCO if these are tasks
190197
and p.tc_direct_project_id not in (8943, 16411, 16412, 16413, 16406, 16399, 16407)-- exclude projects for fun and university challenges
191198
-- and mod(p.project_id, 2) = 0
199+
and p.project_id not in (select ce.contest_id from contest_eligibility ce) --excluding private challenges
192200
and 1 = 1;
193201

194202
-- Stage 3
@@ -206,6 +214,7 @@ WHERE p.project_status_id = 1
206214
and NVL(pi82.value, 0) = 0 -- No TCO if these are tasks
207215
and p.tc_direct_project_id not in (8943, 16411, 16412, 16413, 16406, 16399, 16407)-- exclude projects for fun and university challenges
208216
-- and mod(p.project_id, 2) = 0
217+
and p.project_id not in (select ce.contest_id from contest_eligibility ce) --excluding private challenges
209218
and 1 = 1;
210219

211220

@@ -231,6 +240,7 @@ WHERE p.project_status_id = 1
231240
-- and mod(p.project_id, 2) = 0
232241
and not exists (SELECT 1 FROM comp_technology
233242
WHERE comp_vers_id = pi1.value AND technology_type_id = 78) -- exclude QA Challenges from F2F
243+
and p.project_id not in (select ce.contest_id from contest_eligibility ce) --excluding private challenges
234244
and 1 = 1;
235245

236246
-- Stage 2
@@ -252,6 +262,7 @@ WHERE p.project_status_id = 1
252262
-- and mod(p.project_id, 2) = 0
253263
and not exists (SELECT 1 FROM comp_technology
254264
WHERE comp_vers_id = pi1.value AND technology_type_id = 78) -- exclude QA Challenges from F2F
265+
and p.project_id not in (select ce.contest_id from contest_eligibility ce) --excluding private challenges
255266
and 1=1;
256267

257268
-- Stage 3
@@ -272,6 +283,7 @@ WHERE p.project_status_id = 1
272283
-- and mod(p.project_id, 2) = 0
273284
and not exists (SELECT 1 FROM comp_technology
274285
WHERE comp_vers_id = pi1.value AND technology_type_id = 78) -- exclude QA Challenges from F2F
286+
and p.project_id not in (select ce.contest_id from contest_eligibility ce) --excluding private challenges
275287
and 1 = 1;
276288

277289

@@ -292,6 +304,7 @@ WHERE p.project_status_id = 1
292304
and NVL(pi82.value, 0) = 0 -- No TCO if these are tasks
293305
and p.tc_direct_project_id not in (8943, 16411, 16412, 16413, 16406, 16399, 16407)-- exclude projects for fun and university challenges
294306
-- and mod(p.project_id, 2) = 0
307+
and p.project_id not in (select ce.contest_id from contest_eligibility ce) --excluding private challenges
295308
and 1 = 1;
296309

297310
-- Stage 2
@@ -309,6 +322,7 @@ WHERE p.project_status_id = 1
309322
and NVL(pi82.value, 0) = 0 -- No TCO if these are tasks
310323
and p.tc_direct_project_id not in (8943, 16411, 16412, 16413, 16406, 16399, 16407)-- exclude projects for fun and university challenges
311324
-- and mod(p.project_id, 2) = 0
325+
and p.project_id not in (select ce.contest_id from contest_eligibility ce) --excluding private challenges
312326
and 1 = 1;
313327

314328
-- Stage 3
@@ -326,4 +340,5 @@ WHERE p.project_status_id = 1
326340
and NVL(pi82.value, 0) = 0 -- No TCO if these are tasks
327341
and p.tc_direct_project_id not in (8943, 16411, 16412, 16413, 16406, 16399, 16407)-- exclude projects for fun and university challenges
328342
-- and mod(p.project_id, 2) = 0
343+
and p.project_id not in (select ce.contest_id from contest_eligibility ce) --excluding private challenges
329344
and 1 = 1;

0 commit comments

Comments
 (0)