query-63cb5a9e64bc64dbd7653cf355cdb010

rq turtle/ttl

TODO

Use at

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT  DISTINCT ?item ?anidb WHERE {
  { ?item wdt:P31 wd:Q80447738 . }
  UNION
  { ?item wdt:P31 wd:Q87576284 . }
  OPTIONAL { ?item wdt:P5648 ?anidb_ .}
  BIND(IF(!BOUND(?anidb_),"[https://anidb.net/character/?adb.search=$label&do.search=1 missing]",concat("[https://anidb.net/character/",?anidb_," ",?anidb_,"]")) as ?anidb)
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?anidb"):::projected v2("?anidb_") v1("?item"):::projected c3(["wd:Q87576284"]):::iri c2(["wd:Q80447738"]):::iri subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P31"--> c3 end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P31"--> c2 end union0r <== or ==> union0l end subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P5648".-> v2 end bind0[/"if(not bound(?anidb_),'#91;https://anidb.net/character/?adb.search=$label&do.search=1 missing#93;',concat('#91;https://anidb.net/character/',?anidb_,' ',?anidb_,'#93;'))"/] v2 --o bind0 bind0 --as--o v3