blob: 3562db319fc6dd785aa8134f6525c15b0f857106 [file] [log] [blame]
# An optional and an fixed pattern
PREFIX : <http://example.org/>
# Ensure an optional does not mask a later one.
# This query works unreordered because it has written out the needed UNION
SELECT *
WHERE
{
:x :p ?v .
OPTIONAL {:y ?p ?a }
OPTIONAL {:z ?p ?v }
}
## SELECT DISTINCT *
## {
## :x :p ?v .
## { OPTIONAL {:y ?p ?a } OPTIONAL {:z ?p ?v } }
## UNION
## { OPTIONAL {:z ?p ?v } OPTIONAL {:y ?p ?a } }
## }