query-b7eeaf2ac794124045939c0ed780225f
Usage }}?number_of_instances=value|number=property|?class=item|query no qualifier{{ ?class p:P1114 ?class_number_statement . ?class_number_statement ps:P1114 ?number_of_instances . FILTER NOT EXISTS { ?class_number_statement ?classnumberpq_pred [] . # a triple involving our statement ... [] wikibase:qualifier ?classnumberpq_pred . # ... with a predicate ?pq_pred that is a qualifier } In context:
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX p: <http://www.wikidata.org/prop/>
select ?class ?number_of_instances {
# get all the classes with an unqualified "number" statement, the cardinality of the class
?class p:P1114 ?class_number_statement .
?class_number_statement ps:P1114 ?number_of_instances .
FILTER NOT EXISTS {
?class_number_statement ?classnumberpq_pred [] . # a triple involving our statement ...
[] wikibase:qualifier ?classnumberpq_pred . # ... with a predicate ?pq_pred that is a qualifier
}
}
Query found at
- https://www.wikidata.org/wiki/Template:Query_no_qualifier
- https://www.wikidata.org/wiki/Template:Query_no_qualifier/doc
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?class"):::projected
v1("?class_number_statement")
v2("?classnumberpq_pred")
v4("?number_of_instances"):::projected
a1((" "))
a2((" "))
f0[["not "]]
subgraph f0e0["Exists Clause"]
e0v1 -->e0v2--> e0a1
e0a2 --"wikibase:qualifier"--> e0v2
e0v1("?class_number_statement"):::projected
e0v2("?classnumberpq_pred"):::projected
e0a1((" ")):::projected
e0a2((" ")):::projected
end
f0--EXISTS--> f0e0
f0 --> v1
f0 --> v2
f0 --> a1
f0 --> a2
f0 --> c1
v1 -->v2--> a1
a2 --"wikibase:qualifier"--> v2
v3 --"p:P1114"--> v1
v1 --"p:statement/P1114"--> v4