query-89295922823c21873a6fba0c37db652a

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 ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel ?circo ?circoLabel (COUNT(*) AS ?sitelinks)  WHERE {
  ?item wdt:P31 wd:Q5;
     p:P3602 ?statement.
  ?statement ps:P3602  wd:Q106253677.
  OPTIONAL { ?statement pq:P768 ?circo. }
  ?sitelink schema:about ?item.
  FILTER (SUBSTR(str(?sitelink), 11, 15) = ".wikipedia.org/") .
  SERVICE wikibase:label { bd:serviceParam wikibase:language "fr,en". }
}
GROUP BY ?item ?itemLabel ?circo ?circoLabel 
ORDER BY DESC (?count)
LIMIT 100

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v5("?circo"):::projected v1("?count") v3("?item"):::projected v2("?sitelink") v6("?sitelinks") v4("?statement") c8(["wd:Q106253677"]):::iri c12(["bd:serviceParam"]):::iri c5(["wd:Q5"]):::iri c14(["fr,en"]):::literal f0[["substring(str(?sitelink),'11^^xsd:integer','15^^xsd:integer') = '.wikipedia.org/'"]] f0 --> v2 v3 --"p:direct/P31"--> c5 v3 --"p:P3602"--> v4 v4 --"p:statement/P3602"--> c8 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v4 -."p:qualifier/P768".-> v5 end v2 --"schema:about"--> v3 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c12 --"wikibase:language"--> c14 end bind2[/"count(*)"/] bind2 --as--o v6