query-285ec46207a440ced93a723cc1f0d43c

rq turtle/ttl

Propertiesinstance of (P31)occupation (P106)subclass of (P279)award received (P166)point in time (P585)

Use at

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 ?person ?personLabel ?award ?awardLabel ?year WHERE {
  ?person p:P166 ?statement.
  ?statement ps:P166 ?award.
  ?award wdt:P31 wd:Q17701409 
  MINUS { ?person wdt:P106 wd:Q188094 }
MINUS{ ?person wdt:P31/wdt:P279? wd:Q15632617 } # exclude fictional people
  OPTIONAL { ?statement pq:P585 ?date. BIND(YEAR(?date) AS ?year) }
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],mul,en" }
} ORDER BY ASC(?awardLabel) ASC(?year)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v5("?award"):::projected v1("?awardLabel"):::projected v6("?date") v3("?person"):::projected v4("?statement") v7("?year"):::projected a1((" ")) c13(["#91;AUTO_LANGUAGE#93;,mul,en"]):::literal c4(["wd:Q17701409"]):::iri c11(["bd:serviceParam"]):::iri c6(["wd:Q188094"]):::iri c7(["wd:Q15632617"]):::iri v3 --"p:P166"--> v4 v4 --"p:statement/P166"--> v5 v5 --"p:direct/P31"--> c4 subgraph minus0["MINUS"] style minus0 stroke-width:6px,fill:pink,stroke:red; v3 --"p:direct/P106"--> c6 end subgraph minus1["MINUS"] style minus1 stroke-width:6px,fill:pink,stroke:red; v3 --"p:direct/P31"--> a1 subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; a1 --"p:direct/P279"--> c7 end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; end union0r <== or ==> union0l end end subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v4 -."p:qualifier/P585".-> v6 bind2[/"year-from-dateTime(?date)"/] v6 --o bind2 bind2 --as--o v7 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c11 --"wikibase:language"--> c13 end