query-ba65a5109b4ad8e13997ff4bac71d66d

rq turtle/ttl

, the problem will be solved. I managed to write this (SPARQL is not my thing, I wrote this based on other queries): and there is no qualifier Pxxx(Q51139288)NFPA 704: Standard System for the Identification of the Hazards of Materials for Emergency Response (P4952)safety classification and labelling select all items where I thought that if I add this constraint to P993/P994/P995/P877 and the constraint is like

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?item ?itemLabel
WHERE { ?item wdt:P4952 wd:Q51139288.
        ?item p:P4952 ?statement.
        FILTER NOT EXISTS { ?statement pq:P993 ?x }

        SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
      }
LIMIT 2000

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?item"):::projected v1("?statement") v2("?x") c6(["bd:serviceParam"]):::iri c3(["wd:Q51139288"]):::iri c8(["#91;AUTO_LANGUAGE#93;,en"]):::literal f0[["not "]] subgraph f0e0["Exists Clause"] e0v1 --"p:qualifier/P993"--> e0v2 e0v1("?statement"):::projected e0v2("?x"):::projected end f0--EXISTS--> f0e0 f0 --> v1 f0 --> c1 f0 --> v2 v1 --"p:qualifier/P993"--> v2 v3 --"p:direct/P4952"--> c3 v3 --"p:P4952"--> v1 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c6 --"wikibase:language"--> c8 end