We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5e70ecf commit 62cf397Copy full SHA for 62cf397
mcc/resources/queries/mcc/mccPedigree.sql
@@ -32,7 +32,7 @@ SELECT
32
null as originalSire,
33
'Added' as category
34
FROM mcc.aggregatedDemographics s
35
-WHERE s.sire NOT IN (SELECT distinct Id FROM mcc.aggregatedDemographics)
+WHERE s.sire IS NOT NULL AND s.sire NOT IN (SELECT distinct ad.Id FROM mcc.aggregatedDemographics ad WHERE ad.Id IS NOT NULL)
36
GROUP BY s.sire
37
38
UNION ALL
@@ -51,5 +51,5 @@ SELECT
51
52
53
54
-WHERE s.dam NOT IN (SELECT distinct Id FROM mcc.aggregatedDemographics)
+WHERE s.dam IS NOT NULL AND s.dam NOT IN (SELECT distinct ad.Id FROM mcc.aggregatedDemographics ad WHERE ad.Id IS NOT NULL)
55
GROUP BY s.dam
0 commit comments