query-415d239b485a8fd7f372e5760469fa22

rq turtle/ttl

Propertiesinstance of (P31)subclass of (P279)dissolved, abolished or demolished date (P576)official website (P856)award received (P166)point in time (P585)

Use at

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX schema: <http://schema.org/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
SELECT ?award ?enwp ?url (MAX(?time) as ?latest) WHERE {
?award wdt:P31/wdt:P279+ wd:Q618779.
MINUS { ?award wdt:P576 [] } # Exclude abolished
 [] p:P166 ?statement.
       ?statement ps:P166 ?award.
       ?statement pq:P585 ?time.
OPTIONAL{ ?award wdt:P856 ?url }
FILTER (YEAR(?time)<2016)
FILTER (YEAR(?time)>1960)
?enwp schema:about ?award; schema:isPartOf <https://en.wikipedia.org/>
} GROUP BY ?award ?enwp ?url
ORDER BY DESC(?latest)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?award"):::projected v6("?enwp"):::projected v7("?latest") v4("?statement") v2("?time"):::projected v5("?url"):::projected a2((" ")) a3((" ")) a1((" ")) c5(["wd:Q618779"]):::iri c13([https://en.wikipedia.org/]):::iri f0[["year-from-dateTime(?time) > '1960^^xsd:integer'"]] f0 --> v2 f1[["year-from-dateTime(?time) < '2016^^xsd:integer'"]] f1 --> v2 v3 --"p:direct/P31"--> a1 a1 --"p:direct/P279"--> c5 subgraph minus2["MINUS"] style minus2 stroke-width:6px,fill:pink,stroke:red; v3 --"p:direct/P576"--> a2 end a3 --"p:P166"--> v4 v4 --"p:statement/P166"--> v3 v4 --"p:qualifier/P585"--> v2 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v3 -."p:direct/P856".-> v5 end v6 --"schema:about"--> v3 v6 --"schema:isPartOf"--> c13 bind4[/"max(?time)"/] v2 --o bind4 bind4 --as--o v7