query-3d3dd2a5a5ed1a4dcc105af9d7bfde69
TODO
Use at
- https://query.wikidata.org/sparql
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX dbpprop: <http://dbpedia.org/property/>
SELECT ?NobelId ?item ?LaureateNobelUri ?NobelBirth ?NobelGender ?NobelDeath ?WDBirth ?WDGender ?WDDeath ?birthmismatch ?deathmismatch
where
{
{SELECT ?NobelId ?item ?LaureateNobelUri ?NobelBirth ?NobelGender ?NobelDeath ?WDBirth ?WDGender ?WDDeath{
SERVICE <http://data.nobelprize.org/sparql> {
SELECT distinct ?NobelId ?LaureateNobelUri ?NobelBirth ?NobelDeath ?NobelGender WHERE {
?LaureateNobelUri <http://data.nobelprize.org/terms/laureateAward> ?NobelAwardid.
BIND(REPLACE(str(?LaureateNobelUri),"http://data.nobelprize.org/resource/laureate/","") AS ?NobelId)
OPTIONAL{ ?LaureateNobelUri foaf:birthday ?NobelBirth}
OPTIONAL{ ?LaureateNobelUri foaf:gender ?NobelGender}
OPTIONAL{ ?LaureateNobelUri dbpprop:dateOfDeath ?NobelDeath}
}
}
}
} ?item wdt:P2888 ?LaureateNobelUri .
OPTIONAL{ ?item wdt:P569 ?WDBirth.}
OPTIONAL{ ?item wdt:P21 ?WDGender.}
OPTIONAL{ ?item wdt:P570 ?WDDeath.}
BIND(!(xsd:date(?WDBirth)=xsd:date(?NobelBirth)) AS ?birthmismatch)
BIND(!(xsd:date(?WDDeath)=xsd:date(?NobelDeath)) AS ?deathmismatch)
FILTER(?birthmismatch|| ?deathmismatch)
}
order by desc(xsd:integer(?NobelId))
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?LaureateNobelUri"):::projected
v5("?NobelAwardid")
v6("?NobelBirth"):::projected
v8("?NobelDeath"):::projected
v7("?NobelGender"):::projected
v6("?NobelId"):::projected
v10("?WDBirth"):::projected
v12("?WDDeath"):::projected
v11("?WDGender"):::projected
v13("?birthmismatch"):::projected
v13("?deathmismatch"):::projected
v9("?item"):::projected
f0[["(?birthmismatch || ?deathmismatch)"]]
f0 --> v13
f0 --> v13
subgraph s1["http://data.nobelprize.org/sparql"]
style s1 stroke-width:4px;
v4 --http://data.nobelprize.org/terms/laureateAward--> v5
bind1[/"replace(str(?LaureateNobelUri),'http://data.nobelprize.org/resource/laureate/','')"/]
v4 --o bind1
bind1 --as--o v6
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v4 -.http://xmlns.com/foaf/0.1/birthday.-> v6
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v4 -.http://xmlns.com/foaf/0.1/gender.-> v7
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v4 -.http://dbpedia.org/property/dateOfDeath.-> v8
end
end
v9 --"wdt:P2888"--> v4
subgraph optional3["(optional)"]
style optional3 fill:#bbf,stroke-dasharray: 5 5;
v9 -."wdt:P569".-> v10
end
subgraph optional4["(optional)"]
style optional4 fill:#bbf,stroke-dasharray: 5 5;
v9 -."wdt:P21".-> v11
end
subgraph optional5["(optional)"]
style optional5 fill:#bbf,stroke-dasharray: 5 5;
v9 -."wdt:P570".-> v12
end
bind2[/"not http://www.w3.org/2001/XMLSchema#date(?WDBirth) = http://www.w3.org/2001/XMLSchema#date(?NobelBirth)"/]
v10 --o bind2
v6 --o bind2
bind2 --as--o v13
bind3[/"not http://www.w3.org/2001/XMLSchema#date(?WDDeath) = http://www.w3.org/2001/XMLSchema#date(?NobelDeath)"/]
v12 --o bind3
v8 --o bind3
bind3 --as--o v13