query-dd76786df3864d3deeffb05fa7db3476
Need help to search for New York Times journalists that are aliveI tried this query after reading some documentation and examples, but I'm not getting what I want. Here's the query code:
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
WHERE {
?item wdt:P31 wd:Q5. # instance of human
?item wdt:P106 wd:Q1930187. # occupation is journalist
?item wdt:P108 wd:Q9684. # employer is the New York Times (NYT)
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } #itemLabel is in English
}
ORDER BY DESC(?P569) # supposed to order the list by date of birth
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?P569")
v2("?item"):::projected
c4(["wd:Q1930187"]):::iri
c6(["wd:Q9684"]):::iri
c8(["bd:serviceParam"]):::iri
c2(["wd:Q5"]):::iri
c10(["#91;AUTO_LANGUAGE#93;,en"]):::literal
v2 --"wdt:P31"--> c2
v2 --"wdt:P106"--> c4
v2 --"wdt:P108"--> c6
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c8 --"wikibase:language"--> c10
end