query-7972c7958ff4fb627b1b0233bc6870d4

rq turtle/ttl

Artisti con opere alla Certosa di Bologna senza voce su it.wiki, e n. voci in altre lingue o progetti Wikimedia SELECT ?item ?itemLabel ?cnt WHERE { { SELECT ?item (COUNT(?sitelink) AS ?cnt) WHERE { ?item wdt:P31 wd:Q5 . ?item wdt:P6379 wd:Q3671680 . ?sitelink schema:about ?item . FILTER NOT EXISTS { ?article schema:about ?item . ?article schema:isPartOf https://it.wikipedia.org/ . #Targeting Wikipedia language where subjects has no article. } } GROUP BY ?item ORDER BY DESC (?cnt) LIMIT 1000 #Sorted by amount of articles in other languages. Result limited to 1000 lines to not have a timeout error. } SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en,fr,it,es,de" } #Service to resolve labels in (fallback) languages: automatic user language, English, French, Spanish, German. } ORDER BY DESC (?cnt)

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#>
#Artisti con opere alla Certosa di Bologna senza voce su it.wiki, e n. voci in altre lingue o progetti Wikimedia
SELECT ?item ?itemLabel ?cnt WHERE {
{
  SELECT ?item (COUNT(?sitelink) AS ?cnt) WHERE { 
  ?item wdt:P31 wd:Q5 .
  ?item wdt:P6379 wd:Q3671680 .
  ?sitelink schema:about ?item .
  FILTER NOT EXISTS {
    ?article schema:about ?item .
    ?article schema:isPartOf <https://it.wikipedia.org/> . #Targeting Wikipedia language where subjects has no article.
  }
  } GROUP BY ?item ORDER BY DESC (?cnt) LIMIT 1000 #Sorted by amount of articles in other languages. Result limited to 1000 lines to not have a timeout error.
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en,fr,it,es,de" }  #Service to resolve labels in (fallback) languages: automatic user language, English, French, Spanish, German.
} ORDER BY DESC (?cnt)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?article") v5("?cnt"):::projected v3("?item"):::projected v4("?sitelink") c11(["#91;AUTO_LANGUAGE#93;,en,fr,it,es,de"]):::literal c7(["wd:Q3671680"]):::iri c9(["bd:serviceParam"]):::iri c5(["wd:Q5"]):::iri c3([https://it.wikipedia.org/]):::iri f0[["not "]] subgraph f0e0["Exists Clause"] e0v1 --"schema:about"--> e0v2 e0v1 --"schema:isPartOf"--> e0c3 e0v1("?article"):::projected e0v2("?item"):::projected e0c3([https://it.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:P31"--> c5 v3 --"wdt:P6379"--> c7 v4 --"schema:about"--> v3 bind2[/"count(?sitelink)"/] v4 --o bind2 bind2 --as--o v5 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c9 --"wikibase:language"--> c11 end