query-f6fdb1835d3e1562d7669f9a388d644e
USA Politicians whose fathers are politicians SELECT ?item ?itemLabel WHERE { #Item Property Value ?item wdt:P31 wd:Q5 . # all the items with instance of value human ?item wdt:P27 wd:Q30 . # and who are citizens of the USA ?item wdt:P106 wd:Q1930187 . #and who are journalists ?item wdt:P106 wd:Q49757 . #and who are poets
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
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 bd: <http://www.bigdata.com/rdf#>
#USA Politicians whose fathers are politicians
SELECT ?item ?itemLabel
WHERE
{
#Item Property Value
?item wdt:P31 wd:Q5 . # all the items with instance of value human
?item wdt:P27 wd:Q30 . # and who are citizens of the USA
?item wdt:P106 wd:Q1930187 . #and who are journalists
?item wdt:P106 wd:Q49757 . #and who are poets
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;
v1("?item"):::projected
c6(["wd:Q1930187"]):::iri
c9(["bd:serviceParam"]):::iri
c2(["wd:Q5"]):::iri
c4(["wd:Q30"]):::iri
c11(["#91;AUTO_LANGUAGE#93;,en"]):::literal
c7(["wd:Q49757"]):::iri
v1 --"wdt:P31"--> c2
v1 --"wdt:P27"--> c4
v1 --"wdt:P106"--> c6
v1 --"wdt:P106"--> c7
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c9 --"wikibase:language"--> c11
end