query-e7180c8a9bc24a493cd3e9a5977613dd
Why UNION doesn't work in the second query?Sorry about long post, but i am little bit lost on why the third example where i try the combining the two SERVICE requests with UNION doesnt work. UNION works like expected THIS WORKS:
Use at
- https://query.wikidata.org/sparql
SELECT ?cattitle ?b WHERE
{
{
VALUES ?cattitle {
"Turku"
}
{
SELECT * WHERE { ?b ?c ?cattitle }
}
}
UNION
{
VALUES ?cattitle {
"Raisio"
}
{
SELECT * WHERE { ?b ?c ?cattitle }
}
}
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?b"):::projected
v3("?c")
v4("?cattitle"):::projected
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
bind0[/VALUES ?cattitle/]
bind0-->v4
bind00(["Raisio"])
bind00 --> bind0
v2 -->v3--> v4
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
bind1[/VALUES ?cattitle/]
bind1-->v4
bind10(["Turku"])
bind10 --> bind1
v2 -->v3--> v4
end
union0r <== or ==> union0l
end