query-a6431309cb46234666f08814bd21e62d
Items with P1411 without qualifier P585 (if P1686 is present) and label for values of P1686. I can't get the P1686 part to work. This is what I have so far: (P1686)for work qualifier. I want to display the following data: QID, Label, QID for value, label for value, Value QID for (P585)point in time items that don't have a (P1411)nominated for I am trying to make a query to list
Use at
- https://query.wikidata.org/sparql
PREFIX bd: <http://www.bigdata.com/rdf#>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT ?item ?itemLabel ?nom ?nomLabel ?werk
{
?item wdt:P1411 ?nom .
FILTER NOT EXISTS { ?nom pq:P585 ?x } .
OPTIONAL {?item pq:P1686 ?werk} .
SERVICE wikibase:label {
bd:serviceParam wikibase:language "nl,en" .
}
} ORDER BY ASC(?item)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?item"):::projected
v2("?nom"):::projected
v4("?werk"):::projected
v3("?x")
c5(["bd:serviceParam"]):::iri
c7(["nl,en"]):::literal
f0[["not "]]
subgraph f0e0["Exists Clause"]
e0v1 --"pq:P585"--> e0v2
e0v1("?nom"):::projected
e0v2("?x"):::projected
end
f0--EXISTS--> f0e0
f0 --> v2
f0 --> c1
f0 --> v3
v2 --"pq:P585"--> v3
v1 --"wdt:P1411"--> v2
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v1 -."pq:P1686".-> v4
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c5 --"wikibase:language"--> c7
end