query-e0c97fd8473e38342759ef38978ee128
add ordinal number of israel by the number of wikilink. (Q545206)Chief of the General Staff I create a query that sort the
Use at
- https://query.wikidata.org/sparql
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 pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel ?itemDescription ?ordinal (COUNT(DISTINCT ?languagelink) AS ?linkcount) WHERE {
# ?item wdt:P31 wd:Q5 .
?item wdt:P39 wd:Q545206 .
OPTIONAL { ?item pq:P1545 ?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)