query-56d00f5c66c0c57610f67bd9e6a502a7

rq turtle/ttl

TODO

Use at

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX schema: <http://schema.org/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?item ?itemLabel (COUNT(?link) AS ?links) WHERE {
  VALUES ?item_class { wd:Q34 wd:Q183 }
  ?item wdt:P27 ?item_class.
  ?item wdt:P21 wd:Q6581072.
  ?item wdt:P31 wd:Q5.
  ?item rdfs:label ?itemLabel . FILTER(lang(?itemLabel)="he")
  OPTIONAL { ?link schema:about ?item. FILTER(CONTAINS(str(?link),'wikipedia.org')) }
}
GROUP BY ?item ?itemLabel
ORDER BY ?item ?itemLabel

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v1("?item"):::projected v2("?itemLabel"):::projected v4("?item_class") v3("?link"):::projected v5("?links") c7(["wd:Q5"]):::iri c5(["wd:Q6581072"]):::iri f0[["?itemLabel = 'he'"]] f0 --> v2 bind1[/VALUES ?item_class/] bind1-->v4 bind10(["wd:Q34"]) bind10 --> bind1 bind11(["wd:Q183"]) bind11 --> bind1 v1 --"wdt:P27"--> v4 v1 --"wdt:P21"--> c5 v1 --"wdt:P31"--> c7 v1 --"rdfs:label"--> v2 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v3 -."schema:about".-> v1 end bind3[/"count(?link)"/] v3 --o bind3 bind3 --as--o v5