query-36618019cef7a156c8aa9ceb1e2211b4

rq turtle/ttl

Variant for use in query templates:

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/>
SELECT DISTINCT ?id WHERE { ?id wdt:P31/wdt:P279* wd:Q3624078; p:P463 ?memberOfStatement. ?memberOfStatement a wikibase:BestRank; ps:P463 wd:Q1065. MINUS { ?memberOfStatement pq:P582 ?endTime. } MINUS { ?id wdt:P576|wdt:P582 ?end. } }

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v4("?end") v3("?endTime") v1("?id"):::projected v2("?memberOfStatement") a1((" ")) c3(["wd:Q3624078"]):::iri c8(["wd:Q1065"]):::iri c6(["wikibase:BestRank"]):::iri v1 --"p:direct/P31"--> a1 a1 --"p:direct/P279"--> c3 v1 --"p:P463"--> v2 v2 --"a"--> c6 v2 --"p:statement/P463"--> c8 subgraph minus0["MINUS"] style minus0 stroke-width:6px,fill:pink,stroke:red; v2 --"p:qualifier/P582"--> v3 end subgraph minus1["MINUS"] style minus1 stroke-width:6px,fill:pink,stroke:red; subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; v1 --"p:direct/P582"--> v4 end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v1 --"p:direct/P576"--> v4 end union0r <== or ==> union0l end end