query-f80d2d86ec2e69dd0f29b00836e5d681
title:Find statements based on a reference SELECT ?item ?itemLabel ?prop2 ?prop2Label ?thing ?prop_pred { ?thing ?prop_pred wd:Q9684. # your item here ?prop wikibase:reference ?prop_pred. ?claim prov:wasDerivedFrom ?thing. ?claim ?p_ []. ?prop2 wikibase:statementProperty ?p_. BIND(IRI(CONCAT(STR(wd:),UCASE(STRBEFORE(STRAFTER(STR(?claim),STR(wds:)),"-")))) as ?item) FILTER(?prop != wd:P31) SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wds: <http://www.wikidata.org/entity/statement/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX prov: <http://www.w3.org/ns/prov#>
PREFIX bd: <http://www.bigdata.com/rdf#>
#title:Find statements based on a reference
SELECT ?item ?itemLabel ?prop2 ?prop2Label
?thing
?prop_pred {
?thing ?prop_pred wd:Q9684. # your item here
?prop wikibase:reference ?prop_pred.
?claim prov:wasDerivedFrom ?thing.
?claim ?p_ []. ?prop2 wikibase:statementProperty ?p_.
BIND(IRI(CONCAT(STR(wd:),UCASE(STRBEFORE(STRAFTER(STR(?claim),STR(wds:)),"-")))) as ?item)
FILTER(?prop != wd:P31)
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }