Skip to content

Fix Marathon Match Query to include Marathon Matches irrespective of … #35

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 18, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 18 additions & 9 deletions tco_setup/tco20_eligible_contests.sql
Original file line number Diff line number Diff line change
Expand Up @@ -306,9 +306,12 @@ INNER JOIN project_info pi14 ON p.project_id = pi14.project_id and pi14.project_
LEFT OUTER JOIN project_info pi82 ON pi82.project_id = p.project_id and pi82.project_info_type_id = 82
LEFT OUTER JOIN project_info pi1 ON pi1.project_id = p.project_id and pi1.project_info_type_id = 1
WHERE p.project_status_id = 1
-- and p.project_category_id in (37)
and p.project_category_id in (9,13,37,38,39,40) --including bug hunt,test suits,Marathon,f2f,code,df2f
and exists( SELECT 1 FROM comp_technology WHERE comp_vers_id = pi1.value AND technology_type_id = 27621212 )
and (
p.project_category_id in (37) -- include marathon matches always
OR
exists (SELECT 1 FROM comp_technology
WHERE comp_vers_id = pi1.value AND technology_type_id = 27621212) -- if the challlenge is tagged as Data Science
)
and p.project_id not in (select project_id from contest_project_xref where contest_id in (703,702)) -- make sure we exclude from tco
and NVL(pi82.value, 0) = 0 -- No TCO if these are tasks
and p.tc_direct_project_id not in (8943, 16411, 16412, 16413, 16406, 16399, 16407)-- exclude projects for fun and university challenges
Expand All @@ -327,9 +330,12 @@ INNER JOIN project_info pi14 ON p.project_id = pi14.project_id and pi14.project_
LEFT OUTER JOIN project_info pi82 ON pi82.project_id = p.project_id and pi82.project_info_type_id = 82
LEFT OUTER JOIN project_info pi1 ON pi1.project_id = p.project_id and pi1.project_info_type_id = 1
WHERE p.project_status_id = 1
-- and p.project_category_id in (37)
and p.project_category_id in (9,13,37,38,39,40) --including bug hunt,test suits,Marathon,f2f,code,df2f
and exists(SELECT 1 FROM comp_technology WHERE comp_vers_id = pi1.value AND technology_type_id = 27621212 )
and (
p.project_category_id in (37) -- include marathon matches always
OR
exists (SELECT 1 FROM comp_technology
WHERE comp_vers_id = pi1.value AND technology_type_id = 27621212) -- if the challlenge is tagged as Data Science
)
and p.project_id not in (select project_id from contest_project_xref where contest_id in (704,702)) -- make sure we exclude from tco
and NVL(pi82.value, 0) = 0 -- No TCO if these are tasks
and p.tc_direct_project_id not in (8943, 16411, 16412, 16413, 16406, 16399, 16407)-- exclude projects for fun and university challenges
Expand All @@ -348,9 +354,12 @@ INNER JOIN project_info pi14 ON p.project_id = pi14.project_id and pi14.project_
LEFT OUTER JOIN project_info pi82 ON pi82.project_id = p.project_id and pi82.project_info_type_id = 82
LEFT OUTER JOIN project_info pi1 ON pi1.project_id = p.project_id and pi1.project_info_type_id = 1
WHERE p.project_status_id = 1
-- and p.project_category_id in (37)
and p.project_category_id in (9,13,37,38,39,40) --including bug hunt,test suits,Marathon,f2f,code,df2f
and exists(SELECT 1 FROM comp_technology WHERE comp_vers_id = pi1.value AND technology_type_id = 27621212 )
and (
p.project_category_id in (37) -- include marathon matches always
OR
exists (SELECT 1 FROM comp_technology
WHERE comp_vers_id = pi1.value AND technology_type_id = 27621212) -- if the challlenge is tagged as Data Science
)
and p.project_id not in (select project_id from contest_project_xref where contest_id in (705,702)) -- make sure we exclude from tco
and NVL(pi82.value, 0) = 0 -- No TCO if these are tasks
and p.tc_direct_project_id not in (8943, 16411, 16412, 16413, 16406, 16399, 16407)-- exclude projects for fun and university challenges
Expand Down