query: SELECT ?item ?v (GROUP_CONCAT( replace(str(?a),"^http://www.wikidata.org/entity/(.*)$",CONCAT("[[Lexeme:$1","|",REPLACE(?lemma,"^(M[0-9][0-9][0-9])x.*$","$1.."),"]] <sup>(",?lg,")</sup>"))) as ?lemmas) (COUNT(?a) as ?ct_l) { { SELECT ?a ?lemma (COUNT(DISTINCT ?tr) as ?ct) { ?a wikibase:lemma ?lemma ; <http://www.w3.org/ns/lemon/ontolex#sense> / wdt:P5972 ?tr . FILTER ( ?a NOT IN ( wd:L123, wd:L1234) ) } GROUP BY ?a ?lemma HAVING(?ct>1) ORDER BY DESC(?ct) LIMIT 100 } { SELECT ?item ?v { ?item wdt:P31 wd:Q21199; wdt:P1181 ?v . FILTER (?v<1000) } } FILTER(str(?ct) = str(?v)) ?a <http://purl.org/dc/terms/language> / wdt:P305 ?lg . } GROUP BY ?item ?v ORDER BY DESC(?v)