query-215cf805f3b81b566666a756f51d4db5

rq turtle/ttl

TODO

Use at

PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
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 ?itemDescription ?ordinal (COUNT(DISTINCT ?languagelink) AS ?linkcount) WHERE {
#     ?item wdt:P31 wd:Q5 .
    ?item p:P39 ?statement. 
    ?statement ps:P39 wd:Q545206 .
    OPTIONAL { ?statement pq:P1545 ?ord .
      BIND(xsd:integer(?ord) as ?ordinal)
    }
    ?languagelink schema:about ?item;
    schema:inLanguage ?lang;
    schema:isPartOf ?partOf.

  SERVICE wikibase:label { bd:serviceParam wikibase:language "he" }
  FILTER(CONTAINS(STR(?partOf), "wikipedia.org"))
}
GROUP BY ?item ?itemLabel ?linkcount ?itemDescription ?ordinal
ORDER BY DESC(?linkcount)

Query found at