query-b970aeda2bd2e8fe32696db909a25ff3
Query to find properties which may need to this constraintBelow is a query which helps find properties for which this constraint may need to be added:
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?property ?propertyLabel ?language ?languageLabel WHERE {
?property rdf:type wikibase:Property.
?property p:P2302 ?typeconstraint.
?typeconstraint ps:P2302 wd:Q52004125.
?typeconstraint pq:P2305 ?itemtype.
FILTER(?itemtype IN (wd:Q51885771, wd:Q54285143, wd:Q54285715)).
OPTIONAL {
?property p:P2302 ?langconstraint.
?langconstraint ps:P2302 wd:Q55819106.
?langconstraint pq:P2305 ?language.
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
GROUP BY ?property ?propertyLabel ?language ?languageLabel
ORDER BY ASC(?propertyLabel)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?itemtype")
v5("?langconstraint")
v6("?language"):::projected
v3("?property"):::projected
v1("?propertyLabel"):::projected
v4("?typeconstraint")
c10(["wd:Q55819106"]):::iri
c5(["wikibase:Property"]):::iri
c8(["wd:Q52004125"]):::iri
c12(["bd:serviceParam"]):::iri
c14(["#91;AUTO_LANGUAGE#93;,en"]):::literal
list0c3(["wd:Q54285715"]):::iri
list0c1(["wd:Q51885771"]):::iri
list0c2(["wd:Q54285143"]):::iri
list0c1 --o f0
list0c2 --o f0
list0c3 --o f0
f0[[" in "]]
f0 --> v2
v3 --"a"--> c5
v3 --"p:P2302"--> v4
v4 --"p:statement/P2302"--> c8
v4 --"p:qualifier/P2305"--> v2
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v3 -."p:P2302".-> v5
v5 --"p:statement/P2302"--> c10
v5 --"p:qualifier/P2305"--> v6
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c12 --"wikibase:language"--> c14
end