query-1bc0efee08de5f768fa8bc19c3b2032e

rq turtle/ttl

Q229 or Q41Hello. Sorry for writing in your talk page and not in Request a query page. Is just a small change. How can this query search for both P27 -> Q229 or Q41.

Use at

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#>
SELECT ?item ?itemLabel
{
    ?item wdt:P27 wd:Q229 .
    ?item wdt:P31 wd:Q5 .
    ?item wdt:P735 wd:Q87263878 .
    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 c8(["bd:serviceParam"]):::iri c2(["wd:Q229"]):::iri c4(["wd:Q5"]):::iri c10(["#91;AUTO_LANGUAGE#93;,en"]):::literal c6(["wd:Q87263878"]):::iri v1 --"wdt:P27"--> c2 v1 --"wdt:P31"--> c4 v1 --"wdt:P735"--> c6 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c8 --"wikibase:language"--> c10 end