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

Commit f812d57

Browse files
authored
Merge pull request #117 from topcoder-platform/fix_get_registrants_query
fix registrant query
2 parents c2333b8 + 68d8898 commit f812d57

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/main/resources/sql/challenge-feeder/detail/get_registrants.sql

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,17 @@ select
1010
ELSE decode(ri4.value, 'N/A', '0', ri4.value)::int
1111
END AS rating,
1212
ri5.value::int AS reliability,
13-
c.iso_alpha3_code AS countryCode,
13+
ct.iso_alpha3_code AS countryCode,
1414
p.project_id AS challengeId
1515
from resource rur
1616
, resource_info ri1
1717
, project p
1818
, user u
19-
, common_oltp\:user_address_xref uax
20-
, common_oltp\:address a
21-
, common_oltp\:country c
2219
, project_category_lu pcl
2320
, outer resource_info ri4
2421
, outer resource_info ri5
2522
, outer informixoltp\:algo_rating ar
23+
, outer(common_oltp\:user_address_xref uax, common_oltp\:address adr, common_oltp\:country ct)
2624
where
2725
p.project_id = rur.project_id
2826
and rur.resource_id = ri1.resource_id
@@ -37,6 +35,6 @@ select
3735
and ar.coder_id = u.user_id
3836
and ar.algo_rating_type_id=3
3937
and uax.user_id = u.user_id
40-
and a.address_id = uax.address_id
41-
and a.country_code = c.country_code
38+
and uax.address_id = adr.address_id
39+
and adr.country_code = ct.country_code
4240
and {filter}

0 commit comments

Comments
 (0)