query-808cb4bb07783eec793a05a9ed024c5b

rq turtle/ttl

TODO

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX schema: <http://schema.org/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT  ?item ?label ?w ?linkcount (count(?article) as ?lw_count) WHERE{
  ?item wikibase:sitelinks ?linkcount . 
  values ?linkcount {90 91 92 93 94 95 96}
  ?item rdfs:label ?label. 
  FILTER(lang(?label)="en")
  FILTER(!strstarts(?label, "Category:"))
  FILTER(!strstarts(?label, "Wikipedia:"))
  FILTER(!strstarts(?label, "Template:"))
  FILTER(!strstarts(?label, "Module:"))
  FILTER NOT EXISTS{?sc schema:about ?item; schema:isPartOf <https://ja.wikipedia.org/> . }

  ?article schema:about ?item ;
           schema:isPartOf ?site . 
  ?site wikibase:wikiGroup "wikipedia" .

  OPTIONAL{?item wdt:P31 ?what.?what rdfs:label ?w. FILTER(lang(?w)="en")}
} group by ?item ?label ?w ?linkcount

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v6("?article"):::projected v2("?item"):::projected v3("?label"):::projected v6("?linkcount"):::projected v9("?lw_count") v1("?sc") v7("?site") v4("?w"):::projected v8("?what") c3([https://ja.wikipedia.org/]):::iri c12(["wikipedia"]):::literal f0[["not "]] subgraph f0e0["Exists Clause"] e0v1 --"schema:about"--> e0v2 e0v1 --"schema:isPartOf"--> e0c3 e0v2("?item"):::projected e0v1("?sc"):::projected e0c3([https://ja.wikipedia.org/]):::iri end f0--EXISTS--> f0e0 f0 --> v1 f0 --> c1 f0 --> v2 f0 --> c2 f0 --> c3 v1 --"schema:about"--> v2 v1 --"schema:isPartOf"--> c3 f1[["not starts-with(?label,'Module:')"]] f1 --> v3 f2[["not starts-with(?label,'Template:')"]] f2 --> v3 f3[["not starts-with(?label,'Wikipedia:')"]] f3 --> v3 f4[["not starts-with(?label,'Category:')"]] f4 --> v3 f5[["?label = 'en'"]] f5 --> v3 v2 --"wikibase:sitelinks"--> v6 bind6[/VALUES ?linkcount/] bind6-->v6 bind60(["90^^xsd:integer"]) bind60 --> bind6 bind61(["91^^xsd:integer"]) bind61 --> bind6 bind62(["92^^xsd:integer"]) bind62 --> bind6 bind63(["93^^xsd:integer"]) bind63 --> bind6 bind64(["94^^xsd:integer"]) bind64 --> bind6 bind65(["95^^xsd:integer"]) bind65 --> bind6 bind66(["96^^xsd:integer"]) bind66 --> bind6 v2 --"rdfs:label"--> v3 v6 --"schema:about"--> v2 v6 --"schema:isPartOf"--> v7 v7 --"wikibase:wikiGroup"--> c12 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P31".-> v8 v8 --"rdfs:label"--> v4 end bind8[/"count(?article)"/] v6 --o bind8 bind8 --as--o v9