query-e1295917464f6fcffaa317c68380a3fc
Reporting on qualifiers irrespective of the property they qualify 18:39, 22 January 2018 (UTC)) talk (Tagishsimon associated with any property ... i.e. without having to supply a set of properties of interest? --(P248)stated in qualifications for two properties. Presuming we gathered the set of QIds that PKM has edited from some other source, how do we query for records amongst that set in which there's a (P248)stated in we find (Q47481343)handloom As an extension of PKM's question, above, if we consider, for instance,
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX prov: <http://www.w3.org/ns/prov#>
PREFIX pr: <http://www.wikidata.org/prop/reference/>
PREFIX p: <http://www.wikidata.org/prop/>
SELECT ?property ?value WHERE {
?property wikibase:claim ?p; wikibase:statementProperty ?ps . # where "?property = wd:Pxxx", "?p = p:Pxxx", and "?ps = ps:Pxxx" for any property Pxxx; one could also filter for property types, etc. here ...
wd:Q47481343 ?p [ ?ps ?value; prov:wasDerivedFrom [ pr:P248 wd:Q28913836 ] ] .
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?p")
v1("?property"):::projected
v3("?ps")
v4("?value"):::projected
a1((" "))
a2((" "))
c4(["wd:Q28913836"]):::iri
c6(["wd:Q47481343"]):::iri
v1 --"wikibase:claim"--> v2
v1 --"wikibase:statementProperty"--> v3
a1 -->v3--> v4
a2 --"p:reference/P248"--> c4
a1 --"prov:wasDerivedFrom"--> a2
c6 -->v2--> a1