query-8a5d959ee60c3869b083f623bead85b1

rq turtle/ttl

Better "number of sitelinks to Wikipedia" queryNumbers of sitelinks for items with Art UK artist ID (P1367) for each language This query:

Use at

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX schema: <http://schema.org/>
SELECT ?lang (COUNT(DISTINCT ?article) AS ?count) WHERE {
  ?article schema:about/wdt:P1367 ?yp_id .  # find articles about things with a BBC 'Your paintings' artist identifier
  FILTER (strafter(strbefore(str(?article),".org"), ".") = "wikipedia") .
  ?article schema:inLanguage ?lang .
} GROUP BY ?lang
ORDER BY DESC (?count)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?article"):::projected v5("?count") v4("?lang"):::projected v3("?yp_id") a1((" ")) f0[["substring-after(substring-before(str(?article),'.org'),'.') = 'wikipedia'"]] f0 --> v2 v2 --"schema:about"--> a1 a1 --"wdt:P1367"--> v3 v2 --"schema:inLanguage"--> v4 bind2[/"count(?article)"/] v2 --o bind2 bind2 --as--o v5