query-76cd787c926394bb65ad4f3c83f3a237
Query for usage of instances of inverse property label item (Q65932995) as objects in items ]reply[11:23, 19 June 2020 (UTC)❫ ✉ ❪ChristianKl? (P7087)inverse label item that are used with a different property then (Q65932995)inverse property label item . Is there a way to query that shows all usages of the instances of (P7087)inverse label item exist as values for (Q65932995)inverse property label item Instances of : This query shows all uses of instances of Q65932995 as a value for a statement, a value for a qualifier or a value for a reference. Cases with P7087 are filtered out. Remove one or more of the three filters to see these cases.ChristianKl@
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX prov: <http://www.w3.org/ns/prov#>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?entity ?entityLabel ?property ?propertyLabel ?qualifier ?qualifierLabel
?referenceproperty ?referencepropertyLabel ?instance ?instanceLabel
WHERE
{
?instance wdt:P31 wd:Q65932995.
{
# Uses of ?instance as statement value
?statement ?value ?instance.
?property wikibase:statementProperty ?value.
?property wikibase:claim ?claim.
?entity ?claim ?statement.
FILTER (?property != wd:P7087)
}
UNION
{
# Uses of ?instance as qualifier value
?statement ?qualifiervalue ?instance.
?qualifier wikibase:qualifier ?qualifiervalue.
?property wikibase:claim ?claim.
?entity ?claim ?statement.
FILTER (?qualifier != wd:P7087)
}
UNION
{
# Uses of ?instance as reference value
?reference ?referencevalue ?instance.
?referenceproperty wikibase:reference ?referencevalue.
?statement prov:wasDerivedFrom ?reference.
?property wikibase:claim ?claim.
?entity ?claim ?statement.
FILTER (?referenceproperty != wd:P7087)
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v5("?claim")
v6("?entity"):::projected
v1("?instance"):::projected
v2("?property"):::projected
v7("?qualifier"):::projected
v8("?qualifiervalue")
v10("?reference")
v9("?referenceproperty"):::projected
v11("?referencevalue")
v3("?statement")
v4("?value")
c10(["bd:serviceParam"]):::iri
c2(["wd:Q65932995"]):::iri
c12(["#91;AUTO_LANGUAGE#93;,en"]):::literal
v1 --"wdt:P31"--> c2
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
subgraph union1[" Union "]
subgraph union1l[" "]
style union1l fill:#abf,stroke-dasharray: 3 3;
f0[["?referenceproperty != 'wd:P7087'"]]
f0 --> v9
v10 -->v11--> v1
v9 --"wikibase:reference"--> v11
v3 --"prov:wasDerivedFrom"--> v10
v2 --"wikibase:claim"--> v5
v6 -->v5--> v3
end
subgraph union1r[" "]
style union1r fill:#abf,stroke-dasharray: 3 3;
f1[["?qualifier != 'wd:P7087'"]]
f1 --> v7
v3 -->v8--> v1
v7 --"wikibase:qualifier"--> v8
v2 --"wikibase:claim"--> v5
v6 -->v5--> v3
end
union1r <== or ==> union1l
end
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
f2[["?property != 'wd:P7087'"]]
f2 --> v2
v3 -->v4--> v1
v2 --"wikibase:statementProperty"--> v4
v2 --"wikibase:claim"--> v5
v6 -->v5--> v3
end
union0r <== or ==> union0l
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c10 --"wikibase:language"--> c12
end