Skip to content
This repository was archived by the owner on Jan 23, 2025. It is now read-only.

Commit 8652890

Browse files
authored
updated prize_purse to include all active challenges
1 parent c8b046c commit 8652890

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

queries/tc_direct_facts

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -46,20 +46,11 @@ where exists (select project_id from project where tc_direct_project_id = dp.pro
4646
where project_status_id = 4) AS completed_projects_count,
4747

4848
nvl((select sum(pr.prize_amount)
49-
50-
5149
FROM project p
52-
,project_phase submpp
53-
,project_phase regpp
5450
, project_category_lu pcl
5551
, prize pr
56-
WHERE regpp.project_id = p.project_id
57-
AND regpp.phase_type_id = 1
58-
AND submpp.project_id = p.project_id
59-
AND submpp.phase_type_id = 2
60-
and pr.project_id = p.project_id
52+
WHERE pr.project_id = p.project_id
6153
and p.project_status_id = 1
62-
AND (regpp.phase_status_id = 2)
6354
and pcl.project_category_id = p.project_category_id
6455
AND NOT EXISTS (SELECT 'has_eligibility_constraints' FROM contest_eligibility ce
6556
WHERE ce.contest_id = p.project_id)), 0) AS prize_purse

0 commit comments

Comments
 (0)