query-ea92e0630a4d954ac0bd40b381054ea4
Propertiesinstance of (P31)educated at (P69)place of birth (P19)image (P18)occupation (P106)sex or gender (P21)country (P17)date of birth (P569)
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 schema: <http://schema.org/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX psv: <http://www.wikidata.org/prop/statement/value/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#defaultView:Timeline
SELECT DISTINCT ?Person ?personLabel ?dob ?Gender ?Country ?article ?precision (MAX(?image) AS ?image) (MAX(?Occupation) AS ?Occupation) ?rank
WHERE {
?person wdt:P31 wd:Q5 . # human
?person wdt:P69 wd:Q319239 . #PlaceOfEducation
?person wdt:P19 ?birthPlace .
OPTIONAL { ?person wdt:P18 ?image .} #image
OPTIONAL { ?person wdt:P106 ?occupation .} #occupation
OPTIONAL { ?person wdt:P21 ?gender .} #gender
OPTIONAL { ?birthPlace wdt:P17 ?country } #place of birth
?person p:P569/psv:P569 ?dobNode . #date of birth
?dobNode wikibase:timeValue ?dob .
?dobNode wikibase:timePrecision ?precision .
?article schema:about ?person .
?article schema:isPartOf <https://en.wikipedia.org/>.
?person wikibase:sitelinks ?rank .
SERVICE wikibase:label {
bd:serviceParam wikibase:language "en".
?gender rdfs:label ?Gender .
?person rdfs:label ?Person .
?country rdfs:label ?Country .
?occupation rdfs:label ?Occupation.
}
}
GROUP BY ?Person ?personLabel ?dob ?Gender ?Country ?article ?precision ?rank
ORDER BY DESC (?rank)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v14("?Country"):::projected
v12("?Gender"):::projected
v16("?Occupation"):::projected
v13("?Person"):::projected
v11("?article"):::projected
v3("?birthPlace")
v7("?country")
v9("?dob"):::projected
v8("?dobNode")
v6("?gender")
v16("?image"):::projected
v5("?occupation")
v2("?person")
v10("?precision"):::projected
v1("?rank"):::projected
a1((" "))
c21(["en"]):::literal
c4(["wd:Q319239"]):::iri
c16([https://en.wikipedia.org/]):::iri
c19(["bd:serviceParam"]):::iri
c2(["wd:Q5"]):::iri
v2 --"p:direct/P31"--> c2
v2 --"p:direct/P69"--> c4
v2 --"p:direct/P19"--> v3
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v2 -."p:direct/P18".-> v16
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v2 -."p:direct/P106".-> v5
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v2 -."p:direct/P21".-> v6
end
subgraph optional3["(optional)"]
style optional3 fill:#bbf,stroke-dasharray: 5 5;
v3 -."p:direct/P17".-> v7
end
v2 --"p:P569"--> a1
a1 --"p:statement/value/P569"--> v8
v8 --"wikibase:timeValue"--> v9
v8 --"wikibase:timePrecision"--> v10
v11 --"schema:about"--> v2
v11 --"schema:isPartOf"--> c16
v2 --"wikibase:sitelinks"--> v1
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c19 --"wikibase:language"--> c21
v6 --"rdfs:label"--> v12
v2 --"rdfs:label"--> v13
v7 --"rdfs:label"--> v14
v5 --"rdfs:label"--> v16
end
bind2[/"max(?image)"/]
v16 --o bind2
bind2 --as--o v16
bind3[/"max(?Occupation)"/]
v16 --o bind3
bind3 --as--o v16