query-1c783c9184b6d07217d1ada04acb2f3f

rq turtle/ttl

articles de biografies per nacionalitat (al límit del time-out) SELECT ?ciutadania ?ciutadaniaLabel (COUNT(?article) AS ?numarticles) WITH { SELECT DISTINCT ?persona ?ciutadania ?article WHERE { ?persona wdt:P31 wd:Q5. ?persona wdt:P27 ?ciutadania. ?article schema:isPartOf https://ca.wikipedia.org/. ?article schema:about ?persona. } } AS %1 WHERE { INCLUDE %1. SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],ca". } } GROUP BY ?ciutadania ?ciutadaniaLabel

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#>
# articles de biografies per nacionalitat (al límit del time-out)
SELECT ?ciutadania ?ciutadaniaLabel (COUNT(?article) AS ?numarticles) 
WHERE {
   {
  SELECT DISTINCT ?persona ?ciutadania ?article WHERE {
  ?persona wdt:P31 wd:Q5.
  ?persona wdt:P27 ?ciutadania.
  ?article schema:isPartOf <https://ca.wikipedia.org/>.
  ?article schema:about ?persona.
  }
}
    SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],ca". }
}
GROUP BY ?ciutadania ?ciutadaniaLabel

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?article"):::projected v2("?ciutadania"):::projected v4("?numarticles") v1("?persona") c8(["bd:serviceParam"]):::iri c10(["#91;AUTO_LANGUAGE#93;,ca"]):::literal c2(["wd:Q5"]):::iri c5([https://ca.wikipedia.org/]):::iri v1 --"wdt:P31"--> c2 v1 --"wdt:P27"--> v2 v3 --"schema:isPartOf"--> c5 v3 --"schema:about"--> v1 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c8 --"wikibase:language"--> c10 end bind1[/"count(?article)"/] v3 --o bind1 bind1 --as--o v4