ExampleQueryMatching
From W3C Wiki
# Find pathology reports matching a radiology report. PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX term: <term:/> # not the most inspired namespace... SELECT ?lat ?clock ?radFinding ?pathFinding { { [ a term:MammogramReport ; term:finding [ rdfs:label ?radFinding ; term:location [ term:laterality ?lat ; term:position ?clock ] ] ] } OPTIONAL { [ a term:PathologyReport ; term:finding [ rdfs:label ?pathFinding ; term:location [ term:laterality ?lat ; term:position ?clock ] ] ] } }