query-90e64e851fd96a6ad6ecf73ba6d2e95c
Help with SPARQL query. I got most of it, but the problem I have now with the query is that some of the values it returns have ⧼novalue⧽ as the qualifier value and I want to exclude them from the result too. How can I change the query to remove those entries from the result set? (P3216)ClassInd rating as a qualifier for (P7367)content descriptor that don't have (P3216)ClassInd rating and (P8958)ClassInd audiovisual work ID Hi, I've been using this SPARQL query to get the entities with values for
Use at
- https://query.wikidata.org/sparql
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
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 ?value ?id WHERE {
?item p:P3216 ?statement; wdt:P8958 ?id .
OPTIONAL { ?statement pq:P7367 ?qualif } .
FILTER( !BOUND( ?qualif ) ) .
?statement ps:P3216 ?value
} LIMIT 100
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?id"):::projected
v2("?item"):::projected
v1("?qualif")
v3("?statement")
v5("?value"):::projected
f0[["not bound(?qualif)"]]
f0 --> v1
v2 --"p:P3216"--> v3
v2 --"p:direct/P8958"--> v4
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v3 -."p:qualifier/P7367".-> v1
end
v3 --"p:statement/P3216"--> v5