query-71dc32885a41e4b568c3cf6ff37c8d19

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 schema: <http://schema.org/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel ?article_name ?enwiki (COUNT(?wpSitelink) as ?sitelinks) WHERE {
    ?item wdt:P1435 wd:Q9259 .
#  ?wpSitelink schema:isPartOf [ wikibase:wikiGroup "wikipedia" ];
#                     # schema:inLanguage ?wpLanguage;
#                      schema:about ?item.
   optional {?wpSitelink schema:about ?item . ?wpSitelink schema:isPartOf ?wikilangs .} 
   filter not exists {  ?lvwiki schema:about ?item; schema:isPartOf <https://lv.wikipedia.org/> .}
   optional {?enwiki schema:about ?item; schema:isPartOf <https://en.wikipedia.org/> . ?enwiki schema:name ?article_name }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en,de,fr,pl,ru" }
}
group by ?item ?itemLabel ?article_name ?enwiki
ORDER BY DESC(?sitelinks)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v7("?article_name"):::projected v6("?enwiki"):::projected v3("?item"):::projected v2("?lvwiki") v8("?sitelinks") v5("?wikilangs") v4("?wpSitelink"):::projected c6([https://en.wikipedia.org/]):::iri c9(["bd:serviceParam"]):::iri c3([https://lv.wikipedia.org/]):::iri c5(["wd:Q9259"]):::iri c11(["en,de,fr,pl,ru"]):::literal f0[["not "]] subgraph f0e0["Exists Clause"] e0v1 --"schema:about"--> e0v2 e0v1 --"schema:isPartOf"--> e0c3 e0v2("?item"):::projected e0v1("?lvwiki"):::projected e0c3([https://lv.wikipedia.org/]):::iri end f0--EXISTS--> f0e0 f0 --> v2 f0 --> c1 f0 --> v3 f0 --> c2 f0 --> c3 v2 --"schema:about"--> v3 v2 --"schema:isPartOf"--> c3 v3 --"wdt:P1435"--> c5 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v4 -."schema:about".-> v3 v4 --"schema:isPartOf"--> v5 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v6 -."schema:about".-> v3 v6 --"schema:isPartOf"--> c6 v6 --"schema:name"--> v7 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c9 --"wikibase:language"--> c11 end bind2[/"count(?wpSitelink)"/] v4 --o bind2 bind2 --as--o v8