query-9d4cc97e4cf42847bcaea1bb8b933e07
occupation (P106)
film producer (Q3282637)
inferred from (P3452)
Category:American producers (Q8003952)
SELECT ?item ?statement ?ref ?qs WHERE { ?item wdt:P106 wd:Q3282637; p:P106 ?statement. ?statement prov:wasDerivedFrom ?ref. ?ref pr:P3452 wd:Q8003952. BIND(CONCAT( "-STATEMENT", "\t", STRBEFORE(REPLACE(STR(?statement), "http://www.wikidata.org/entity/statement/", ""), "-"), "$", STRAFTER(REPLACE(STR(?statement), "http://www.wikidata.org/entity/statement/", ""), "-"), " / remove occupation film producer inferred from Member of Category:American producers /") AS ?qs) }
Use at
- https://query.wikidata.org/sparql
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX prov: <http://www.w3.org/ns/prov#>
PREFIX pr: <http://www.wikidata.org/prop/reference/>
PREFIX p: <http://www.wikidata.org/prop/>
# occupation (P106)
# film producer (Q3282637)
# inferred from (P3452)
# Category:American producers (Q8003952)
SELECT ?item ?statement ?ref ?qs WHERE {
?item wdt:P106 wd:Q3282637;
p:P106 ?statement.
?statement prov:wasDerivedFrom ?ref.
?ref pr:P3452 wd:Q8003952.
BIND(CONCAT(
"-STATEMENT",
"\t",
STRBEFORE(REPLACE(STR(?statement), "http://www.wikidata.org/entity/statement/", ""), "-"),
"$",
STRAFTER(REPLACE(STR(?statement), "http://www.wikidata.org/entity/statement/", ""), "-"),
" /* remove occupation film producer inferred from Member of Category:American producers */") AS ?qs)
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?item"):::projected
v4("?qs"):::projected
v3("?ref"):::projected
v2("?statement"):::projected
c2(["wd:Q3282637"]):::iri
c6(["wd:Q8003952"]):::iri
v1 --"p:direct/P106"--> c2
v1 --"p:P106"--> v2
v2 --"prov:wasDerivedFrom"--> v3
v3 --"p:reference/P3452"--> c6
bind0[/"concat('-STATEMENT',' ',substring-before(replace(str(?statement),'http://www.wikidata.org/entity/statement/',''),'-'),'$',substring-after(replace(str(?statement),'http://www.wikidata.org/entity/statement/',''),'-'),' /* remove occupation film producer inferred from Member of Category:American producers */')"/]
v2 --o bind0
bind0 --as--o v4