query-31a102a918879bfe6b8d8fc49c6bd3a0
title: Taxa within scope of WikiProject Invasion biology, sorted by number of languages with associated lexemes
adapted from https://w.wiki/5H28
SELECT ?item ?itemLabel ?taxonname ?count ?langExample ?langExampleLabel (SAMPLE(?lexeme) AS ?lexemeExample) (SAMPLE(?lemma) AS ?lemmaExample) (SAMPLE(?sens) AS ?sense) { { SELECT ?item ?taxonname (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 ; wdt:P225 ?taxonname . } GROUP BY ?item ?taxonname }
?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 ?taxonname ?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: Taxa within scope of WikiProject Invasion biology, sorted by number of languages with associated lexemes
# adapted from https://w.wiki/5H28
SELECT ?item ?itemLabel ?taxonname ?count ?langExample ?langExampleLabel (SAMPLE(?lexeme) AS ?lexemeExample) (SAMPLE(?lemma) AS ?lemmaExample) (SAMPLE(?sens) AS ?sense) {
{
SELECT ?item ?taxonname (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 ;
wdt:P225 ?taxonname .
}
GROUP BY ?item ?taxonname
}
?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 ?taxonname ?count ?langExample ?langExampleLabel ?lemmaExample
ORDER BY DESC(?count)