query-9064aa8f9f1fdf1fd55124eadd9178d5
(Q9684)The New York Times (Q7458218)Sewell Chan Quick links (also used to list QIDs of interest)QIDs created by me
Use at
- https://query.wikidata.org/sparql
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?item ?itemLabel ?dob ?age
WHERE {
?item wdt:P106 wd:Q1930187;
p:P108 ?NYT_statement.
?NYT_statement ps:P108 wd:Q9684;
OPTIONAL {
?item wdt:P569 ?dob.
BIND(xsd:integer((NOW() - ?dob) / 365.25) AS ?age)
}
MINUS { # Former employee
?NYT_statement pq:P582 [].
}
MINUS { ?item wdt:P570 ?dod. } # Living deprived
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY DESC(?dob)
Query found at
- https://www.wikidata.org/wiki/User:Tet
- https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2022/02
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?NYT_statement")
v4("?age"):::projected
v1("?dob"):::projected
v5("?dod")
v2("?item"):::projected
a1((" "))
c2(["wd:Q1930187"]):::iri
c5(["wd:Q9684"]):::iri
c10(["bd:serviceParam"]):::iri
c12(["#91;AUTO_LANGUAGE#93;,en"]):::literal
v2 --"p:direct/P106"--> c2
v2 --"p:P108"--> v3
v3 --"p:statement/P108"--> c5
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v2 -."p:direct/P569".-> v1
bind0[/"http://www.w3.org/2001/XMLSchema#integer(NOW() - ?dob / '365.25^^xsd:decimal')"/]
v1 --o bind0
bind0 --as--o v4
end
subgraph minus1["MINUS"]
style minus1 stroke-width:6px,fill:pink,stroke:red;
v3 --"p:qualifier/P582"--> a1
end
subgraph minus2["MINUS"]
style minus2 stroke-width:6px,fill:pink,stroke:red;
v2 --"p:direct/P570"--> v5
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c10 --"wikibase:language"--> c12
end