query-fc151285a48ea99a58e173d3bf06dc95
Propertiesinstance of (P31)work location (P937)located in the administrative territorial entity (P131)located in/on physical feature (P706)sex or gender (P21)country of citizenship (P27)field of work (P101)occupation (P106)date of birth (P569)date of death (P570)family name (P734)given name (P735)
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 ?firstnameLabel ?lastnameLabel ?itemDescription ?nationalityLabel ?occupationLabel ?genderLabel ?cityLabel ?placeLabel ?birthdate ?deathdate ?domainLabel ?linkcount WHERE {
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],nl,fr,de,en,es,it,no,se,fi". }
?item wdt:P31 wd:Q5, ?instance;
wikibase:sitelinks ?linkcount.
{ ?item wdt:P937 ?city. }
UNION
{
?item wdt:P937 ?place.
?place wdt:P131 ?city.
}
?city wdt:P706 wd:Q640303, ?streek.
OPTIONAL { ?item wdt:P21 ?gender. }
OPTIONAL { ?item wdt:P27 ?nationality. }
OPTIONAL { ?item wdt:P101 ?domain. }
OPTIONAL { ?item wdt:P106 ?occupation. }
OPTIONAL { ?item wdt:P569 ?birthdate. }
OPTIONAL { ?item wdt:P570 ?deathdate. }
OPTIONAL { ?item wdt:P734 ?lastname. }
OPTIONAL { ?item wdt:P735 ?firstname. }
}
ORDER BY (?itemLabel)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v12("?birthdate"):::projected
v5("?city")
v13("?deathdate"):::projected
v10("?domain")
v15("?firstname")
v8("?gender")
v3("?instance")
v2("?item"):::projected
v1("?itemLabel"):::projected
v14("?lastname")
v4("?linkcount"):::projected
v9("?nationality")
v11("?occupation")
v6("?place")
v7("?streek")
c11(["wd:Q640303"]):::iri
c4(["#91;AUTO_LANGUAGE#93;,nl,fr,de,en,es,it,no,se,fi"]):::literal
c2(["bd:serviceParam"]):::iri
c6(["wd:Q5"]):::iri
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c2 --"wikibase:language"--> c4
end
v2 --"wdt:P31"--> c6
v2 --"wdt:P31"--> v3
v2 --"wikibase:sitelinks"--> v4
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
v2 --"wdt:P937"--> v6
v6 --"wdt:P131"--> v5
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v2 --"wdt:P937"--> v5
end
union0r <== or ==> union0l
end
v5 --"wdt:P706"--> c11
v5 --"wdt:P706"--> v7
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P21".-> v8
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P27".-> v9
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P101".-> v10
end
subgraph optional3["(optional)"]
style optional3 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P106".-> v11
end
subgraph optional4["(optional)"]
style optional4 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P569".-> v12
end
subgraph optional5["(optional)"]
style optional5 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P570".-> v13
end
subgraph optional6["(optional)"]
style optional6 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P734".-> v14
end
subgraph optional7["(optional)"]
style optional7 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P735".-> v15
end