query-32e5fd773431df97798230d495c08da4
Given names for humans SELECT ?item ?itemLabel ?country#?country ?countryLabel WHERE { ?item wdt:P31 wd:Q5 . ?item wdt:P21 wd:Q6581072 .
?item wdt:P27 wd:Q218 ;
?item wdt:P27 ?country ; rdfs:label ?itemLabel . MINUS { ?item wdt:P735 [] } . SERVICE wikibase:label { bd:serviceParam wikibase:language "ro". } FILTER (LANG(?itemLabel)="ro") . FILTER(strStarts(?itemLabel, "Viorica")) . }
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 rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>
#Given names for humans
SELECT ?item ?itemLabel ?country#?country ?countryLabel
WHERE
{
?item wdt:P31 wd:Q5 .
?item wdt:P21 wd:Q6581072 .
# ?item wdt:P27 wd:Q218 ;
?item wdt:P27 ?country ;
rdfs:label ?itemLabel .
MINUS { ?item wdt:P735 [] } .
SERVICE wikibase:label { bd:serviceParam wikibase:language "ro". }
FILTER (LANG(?itemLabel)="ro") .
FILTER(strStarts(?itemLabel, "Viorica")) .
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?country"):::projected
v2("?item"):::projected
v1("?itemLabel"):::projected
a1((" "))
c11(["bd:serviceParam"]):::iri
c4(["wd:Q5"]):::iri
c6(["wd:Q6581072"]):::iri
c2(["ro"]):::literal
f0[["starts-with(?itemLabel,'Viorica')"]]
f0 --> v1
f1[["?itemLabel = 'ro'"]]
f1 --> v1
v2 --"wdt:P31"--> c4
v2 --"wdt:P21"--> c6
v2 --"wdt:P27"--> v3
v2 --"rdfs:label"--> v1
subgraph minus2["MINUS"]
style minus2 stroke-width:6px,fill:pink,stroke:red;
v2 --"wdt:P735"--> a1
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c11 --"wikibase:language"--> c2
end