query-f3c7634146ec5e9437d660814c5823af
Help needed with query reaching timeout limit 12:59, 13 May 2019 (UTC)) talk (Jarekt. My original query recently stopped to work, always giving "Query timeout limit reached" error. Can some figure out a way to optimize it so it is able to complete? --(P1001)applies to jurisdiction which are missing required (Q19652)public domain set to (P6216)copyright status Hello, I have a query for detecting items with
Use at
- https://query.wikidata.org/sparql
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 ?item {
?item p:P6216 ?statement .
?statement ps:P6216 wd:Q19652 . # P6216 = "Public Domain"
FILTER NOT EXISTS { ?statement pq:P1001 [] } # exclude if P1001 qualifier present
} LIMIT 100
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?item"):::projected
v1("?statement")
a1((" "))
c4(["wd:Q19652"]):::iri
f0[["not "]]
subgraph f0e0["Exists Clause"]
e0v1 --"p:qualifier/P1001"--> e0a1
e0v1("?statement"):::projected
e0a1((" ")):::projected
end
f0--EXISTS--> f0e0
f0 --> v1
f0 --> c1
f0 --> a1
v1 --"p:qualifier/P1001"--> a1
v2 --"p:P6216"--> v1
v1 --"p:statement/P6216"--> c4