query-2ac4f52c1e66f992fd17a623abf28105

rq turtle/ttl

Some items with some number of statements SELECT ?item ?itemLabel# ?statementCount WHERE { ?item wdt:P625 [] .#P830 ?item wikibase:statements ?statementCount. MINUS {?item wdt:P31 []} OPTIONAL { ?item rdfs:label ?itemLabel; FILTER(LANG(?itemLabel) = "en"). } FILTER(?statementCount <2). }

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
#Some items with some number of statements
SELECT ?item ?itemLabel# ?statementCount 
WHERE {
  ?item wdt:P625 [] .#P830
  ?item wikibase:statements ?statementCount.
  MINUS {?item wdt:P31 []}
  OPTIONAL { ?item rdfs:label ?itemLabel; FILTER(LANG(?itemLabel) = "en"). }
  FILTER(?statementCount <2).
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?item"):::projected v2("?itemLabel"):::projected v1("?statementCount") a1((" ")) a2((" ")) f0[["?statementCount < '2^^xsd:integer'"]] f0 --> v1 v3 --"wdt:P625"--> a1 v3 --"wikibase:statements"--> v1 subgraph minus1["MINUS"] style minus1 stroke-width:6px,fill:pink,stroke:red; v3 --"wdt:P31"--> a2 end subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v3 -."rdfs:label".-> v2 end