query-ca5165a0b6a30979921d6702c72355c0
(Q11173)chemical compound (Q187661)carcinogen
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 p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?item ?itemLabel WHERE {
SERVICE wikibase:label { bd:serviceParam wikibase:language "pl,en". }
{
SELECT DISTINCT ?item WHERE {
?item p:P31 ?statement0.
?statement0 (ps:P31) wd:Q11173.
?item p:P31 ?statement1.
?statement1 (ps:P31) wd:Q187661.
}
}
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?item"):::projected
v2("?statement0")
v3("?statement1")
c8(["wd:Q187661"]):::iri
c2(["bd:serviceParam"]):::iri
c7(["wd:Q11173"]):::iri
c4(["pl,en"]):::literal
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c2 --"wikibase:language"--> c4
end
v1 --"p:P31"--> v2
v2 --"p:statement/P31"--> c7
v1 --"p:P31"--> v3
v3 --"p:statement/P31"--> c8