query-8197c1deb9f924149f50d8d291dcb2fa

rq turtle/ttl

Propertiesinstance of (P31)subclass of (P279)

Use at

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#>
SELECT ?item ?santalilabel ?itemLabel WHERE {
  {
    SELECT ?item WHERE {
      ?item wdt:P31/wdt:P279* wd:Q756 .
    }
  }
  OPTIONAL {
    ?item rdfs:label ?label .
    BIND(STR(?label) AS ?santalilabel) .
  }
  FILTER( REGEX(LANG(?label), '^sat') ) . 
  FILTER( BOUND(?label) ) .
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
} GROUP BY ?item ?itemLabel ?santalilabel 
ORDER BY ASC(?santalilabel)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?item"):::projected v2("?label") v4("?santalilabel"):::projected a1((" ")) c7(["bd:serviceParam"]):::iri c4(["wd:Q756"]):::iri c9(["en"]):::literal f0[["bound(?label)"]] f0 --> v2 f1[["regex(?label,'^sat')"]] f1 --> v2 v3 --"wdt:P31"--> a1 a1 --"wdt:P279"--> c4 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v3 -."rdfs:label".-> v2 bind2[/"str(?label)"/] v2 --o bind2 bind2 --as--o v4 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c7 --"wikibase:language"--> c9 end