query-7c4ae1d86ee9c539a69a3e426ec5b1b4

rq turtle/ttl

TODO

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  ?item2 ?item2Label (sample(?pokemon_) as ?pokemon) where
{
   {
SELECT distinct ?item  ?item2 
WHERE 
{
  ?item wdt:P279 wd:Q3966183. 
  ?item2 wdt:P279 wd:Q3966183. 
  filter (str(?item) < str(?item2) )
  } }  OPTIONAL { ?pokemon_ wdt:P31 ?item.
             ?pokemon_ wdt:P31 ?item2. }
#  filter(!BOUND(?pokemon_))
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } 
} group by ?item ?itemLabel  ?item2 ?item2Label

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v1("?item"):::projected v2("?item2"):::projected v4("?pokemon") v3("?pokemon_"):::projected c2(["wd:Q3966183"]):::iri c5(["bd:serviceParam"]):::iri c7(["#91;AUTO_LANGUAGE#93;,en"]):::literal f0[["str(?item) < str(?item2)"]] f0 --> v1 f0 --> v2 v1 --"wdt:P279"--> c2 v2 --"wdt:P279"--> c2 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v3 -."wdt:P31".-> v1 v3 --"wdt:P31"--> v2 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c5 --"wikibase:language"--> c7 end bind2[/"sample(?pokemon_)"/] v3 --o bind2 bind2 --as--o v4