query-fb1bc91e5a11d42352ead6c4bd4e0a97
title: Items within scope of WikiProject Invasion biology, sorted by number of languages with associated lexemes
adapted from https://w.wiki/5H28
SELECT ?item ?itemLabel ?count ?langExample ?langExampleLabel (SAMPLE(?lexeme) AS ?lexemeExample) (SAMPLE(?lemma) AS ?lemmaExample) (SAMPLE(?sens) AS ?sense) { { SELECT ?item (COUNT(DISTINCT ?lang) AS ?count) (SAMPLE(?lang) AS ?langExample) { ?sens wdt:P5137 ?item . ?lexeme ontolex:sense ?sens ; dct:language ?lang . ?item wdt:P6104 wd:Q56241615 .
}
GROUP BY ?item
}
?lexeme ontolex:sense ?sens ; dct:language ?langExample ; wikibase:lemma ?lemma . ?sens wdt:P5137 ?item . SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } } GROUP BY ?item ?itemLabel ?count ?langExample ?langExampleLabel ?lemmaExample ORDER BY DESC(?count)
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 ontolex: <http://www.w3.org/ns/lemon/ontolex#>
PREFIX dct: <http://purl.org/dc/terms/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#title: Items within scope of WikiProject Invasion biology, sorted by number of languages with associated lexemes
# adapted from https://w.wiki/5H28
SELECT ?item ?itemLabel ?count ?langExample ?langExampleLabel (SAMPLE(?lexeme) AS ?lexemeExample) (SAMPLE(?lemma) AS ?lemmaExample) (SAMPLE(?sens) AS ?sense) {
{
SELECT ?item (COUNT(DISTINCT ?lang) AS ?count) (SAMPLE(?lang) AS ?langExample) {
?sens wdt:P5137 ?item .
?lexeme ontolex:sense ?sens ;
dct:language ?lang .
?item wdt:P6104 wd:Q56241615 .
}
GROUP BY ?item
}
?lexeme ontolex:sense ?sens ;
dct:language ?langExample ;
wikibase:lemma ?lemma .
?sens wdt:P5137 ?item .
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
GROUP BY ?item ?itemLabel ?count ?langExample ?langExampleLabel ?lemmaExample
ORDER BY DESC(?count)