query-090ac99d27876b3ecf0aac22997ac43f
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 ?givenLabel
WHERE
{
{?item wdt:P27 wd:Q148 .}
UNION
{?item wdt:P27 ?state .
?state wdt:P31 wd:Q50068795 . }
?item wdt:P735 ?given .
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
order by ?givenLabel
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?given")
v1("?givenLabel"):::projected
v2("?item"):::projected
v3("?state")
c2(["wd:Q148"]):::iri
c7(["bd:serviceParam"]):::iri
c4(["wd:Q50068795"]):::iri
c9(["#91;AUTO_LANGUAGE#93;,en"]):::literal
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
v2 --"wdt:P27"--> v3
v3 --"wdt:P31"--> c4
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v2 --"wdt:P27"--> c2
end
union0r <== or ==> union0l
end
v2 --"wdt:P735"--> v4
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c7 --"wikibase:language"--> c9
end