query-deb679720ccba1aca3fc809dc4c3553c
title:Get all anime/manga characters SELECT ?item ?itemLabel WHERE { SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } { SELECT DISTINCT ?item WHERE { { ?item wdt:P31 wd:Q80447738. } UNION { ?item wdt:P31 wd:Q87576284. } UNION { ?item wdt:P5648 ?__anidb. } UNION { ?item wdt:P4085 ?__mal. } } } }
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#>
#title:Get all anime/manga characters
SELECT ?item ?itemLabel WHERE {
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
  {
    SELECT DISTINCT ?item WHERE {
      { ?item wdt:P31 wd:Q80447738. }
      UNION
      { ?item wdt:P31 wd:Q87576284. }
      UNION
      { ?item wdt:P5648 ?__anidb. }
      UNION
      { ?item wdt:P4085 ?__mal. }
    }
  }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
  v2("?__anidb")
  v3("?__mal")
  v1("?item"):::projected 
  c2(["bd:serviceParam"]):::iri 
  c7(["wd:Q87576284"]):::iri 
  c6(["wd:Q80447738"]):::iri 
  c4(["#91;AUTO_LANGUAGE#93;,en"]):::literal 
  subgraph s1["http://wikiba.se/ontology#label"]
    style s1 stroke-width:4px;
    c2 --"wikibase:language"-->  c4
  end
  subgraph union0[" Union "]
  subgraph union0l[" "]
    style union0l fill:#abf,stroke-dasharray: 3 3;
    subgraph union1[" Union "]
    subgraph union1l[" "]
      style union1l fill:#abf,stroke-dasharray: 3 3;
      subgraph union2[" Union "]
      subgraph union2l[" "]
        style union2l fill:#abf,stroke-dasharray: 3 3;
        v1 --"wdt:P4085"-->  v3
      end
      subgraph union2r[" "]
        style union2r fill:#abf,stroke-dasharray: 3 3;
        v1 --"wdt:P5648"-->  v2
      end
      union2r <== or ==> union2l
      end
    end
    subgraph union1r[" "]
      style union1r fill:#abf,stroke-dasharray: 3 3;
      v1 --"wdt:P31"-->  c7
    end
    union1r <== or ==> union1l
    end
  end
  subgraph union0r[" "]
    style union0r fill:#abf,stroke-dasharray: 3 3;
    v1 --"wdt:P31"-->  c6
  end
  union0r <== or ==> union0l
  end