We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 65340ad commit db57c78Copy full SHA for db57c78
1 file changed
onprc_ehr/resources/queries/study/parentageSummary.sql
@@ -34,7 +34,7 @@ SELECT
34
35
FROM study.birth b
36
WHERE b.dam is not null and b.qcstate.publicdata = true
37
-And b.dam not in (select k.parent from study.parentage k where k.Id = b.Id and k.relationship = 'dam' and k.enddate is null)
+And 'dam' not in (select k.relationship from study.parentage k where k.Id = b.Id and k.enddate is null)
38
UNION
39
40
SELECT
@@ -46,4 +46,4 @@ SELECT
46
47
FROM study.birth a
48
WHERE a.sire is not null and a.qcstate.publicdata = true
49
- And a.sire not in (select k.parent from study.parentage k where k.Id = a.Id and k.relationship = 'sire'and k.enddate is null)
+ And 'sire' not in (select k.relationship from study.parentage k where k.Id = a.Id and k.enddate is null)
0 commit comments