query-9dee67d9c28b0b152aa1d953ed411179
Propertiesinstance of (P31)subclass of (P279)characters (P674)object of statement has role (P3831)
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 ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel (COUNT(?character) AS ?playable_characters) WHERE {
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
?item (wdt:P31/(wdt:P279*)) wd:Q7889;
p:P674 ?statement.
?statement ps:P674 ?character;
pq:P3831 wd:Q1062345.
}
GROUP BY ?item ?itemLabel
ORDER BY DESC (?playable_characters)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?character"):::projected
v2("?item"):::projected
v5("?playable_characters")
v3("?statement")
a1((" "))
c2(["bd:serviceParam"]):::iri
c4(["#91;AUTO_LANGUAGE#93;,en"]):::literal
c7(["wd:Q7889"]):::iri
c11(["wd:Q1062345"]):::iri
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c2 --"wikibase:language"--> c4
end
v2 --"p:direct/P31"--> a1
a1 --"p:direct/P279"--> c7
v2 --"p:P674"--> v3
v3 --"p:statement/P674"--> v4
v3 --"p:qualifier/P3831"--> c11
bind1[/"count(?character)"/]
v4 --o bind1
bind1 --as--o v5