query-27f4f56fcce67532fa25ded6f40cf99d
category with label starting with 'Category:Ambassadors' and with subject instance of list SELECT DISTINCT ?item ?itemLabel WHERE { ?item wdt:P31 wd:Q4167836. ?item rdfs:label ?itemLabel1 . ?item wdt:P301 ?sub. ?sub wdt:P31 wd:Q13406463. FILTER(STRSTARTS(?itemLabel1, "Category:Ambassadors")). SERVICE wikibase:label { bd:serviceParam wikibase: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 rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>
#category with label starting with 'Category:Ambassadors' and with subject instance of list
SELECT DISTINCT ?item ?itemLabel WHERE {
?item wdt:P31 wd:Q4167836.
?item rdfs:label ?itemLabel1 .
?item wdt:P301 ?sub.
?sub wdt:P31 wd:Q13406463.
FILTER(STRSTARTS(?itemLabel1, "Category:Ambassadors")).
SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?item"):::projected
v1("?itemLabel1")
v3("?sub")
c8(["bd:serviceParam"]):::iri
c10(["en"]):::literal
c3(["wd:Q4167836"]):::iri
c6(["wd:Q13406463"]):::iri
f0[["starts-with(?itemLabel1,'Category:Ambassadors')"]]
f0 --> v1
v2 --"wdt:P31"--> c3
v2 --"rdfs:label"--> v1
v2 --"wdt:P301"--> v3
v3 --"wdt:P31"--> c6
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c8 --"wikibase:language"--> c10
end