diff --git a/src/main/resources/query/find-raw-records.sparql b/src/main/resources/query/find-raw-records.sparql index 88fe392c..a66971f2 100644 --- a/src/main/resources/query/find-raw-records.sparql +++ b/src/main/resources/query/find-raw-records.sparql @@ -24,11 +24,14 @@ SELECT ?r (?r as ?uri) GRAPH ?r { ?r rm:has-question ?f. ?f doc:has_related_question ?s1. - ?f doc:has_related_question ?s2. - FILTER(?s2 != ?s1) - ?s2 doc:has_related_question ?fhaEventQ. - ?fhaEventQ form:has-question-origin ?fhaEventQuestionOrigin. - FILTER(contains(str(?fhaEventQuestionOrigin), "http://vfn.cz/ontologies/ava-study/model/fha-event")) + + OPTIONAL{ + ?f doc:has_related_question ?s2. + FILTER(?s2 != ?s1) + ?s2 doc:has_related_question ?fhaEventQ. + ?fhaEventQ form:has-question-origin ?fhaEventQuestionOrigin. + FILTER(contains(str(?fhaEventQuestionOrigin), "http://vfn.cz/ontologies/ava-study/model/fha-event")) + } ?s1 doc:has_related_question ?FUSq. ?FUSq form:has-question-origin avamod:fuselage-no.