query-e9f566726466eb5fb91a35328007d459
TODO
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel ?orszg ?orszgLabel ?kozig ?kozigLabel ?kezel ?kezelLabel WHERE {
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en,hu". }
{ ?item wdt:P31 wd:Q372690. }
UNION
{ ?item wdt:P31 wd:Q7843791. }
OPTIONAL { ?item wdt:P17 ?orszg. }
OPTIONAL { ?item wdt:P131 ?kozig. }
OPTIONAL { ?item wdt:P137 ?kezel. }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?item"):::projected
v4("?kezel"):::projected
v3("?kozig"):::projected
v2("?orszg"):::projected
c4(["#91;AUTO_LANGUAGE#93;,en,hu"]):::literal
c2(["bd:serviceParam"]):::iri
c7(["wd:Q7843791"]):::iri
c6(["wd:Q372690"]):::iri
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c2 --"wikibase:language"--> c4
end
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
v1 --"wdt:P31"--> c7
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v1 --"wdt:P31"--> c6
end
union0r <== or ==> union0l
end
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P17".-> v2
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P131".-> v3
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P137".-> v4
end