blob: 6c6d420f91de7b4335d683780cb15cedaaa302d4 [file] [log] [blame]
PREFIX : <http://example/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
SELECT count(distinct ?p)
{
# UNION is asymmetric in what it generates
{ ?x rdf:type :X . } UNION { ?x rdf:type :X . FILTER (?x != :x2 )}
# and :x2 :p 2 with ":p 2" occuring twice.
OPTIONAL { ?x :p ?p . }
OPTIONAL { ?x :n ?n . }
}