query-c10970e1264a70c62c0adb2b4185c943
Indians with no first name SELECT ?item ?itemLabel WHERE { ?item wdt:P31 wd:Q5 . ?item wdt:P27 wd:Q668 . OPTIONAL {?item wdt:P735 ?givenname} . FILTER (!bound(?givenname)) . SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" . } } ORDER BY ASC(?itemLabel)
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#>
#Indians with no first name
SELECT ?item ?itemLabel
WHERE {
?item wdt:P31 wd:Q5 .
?item wdt:P27 wd:Q668 .
OPTIONAL {?item wdt:P735 ?givenname} .
FILTER (!bound(?givenname)) .
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" . }
}
ORDER BY ASC(?itemLabel)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?givenname")
v3("?item"):::projected
v1("?itemLabel"):::projected
c7(["bd:serviceParam"]):::iri
c4(["wd:Q668"]):::iri
c2(["wd:Q5"]):::iri
c9(["#91;AUTO_LANGUAGE#93;,en"]):::literal
f0[["not bound(?givenname)"]]
f0 --> v2
v3 --"wdt:P31"--> c2
v3 --"wdt:P27"--> c4
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v3 -."wdt:P735".-> v2
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c7 --"wikibase:language"--> c9
end