Toggle navigation
Home
New Query
Recent Queries
Discuss
Database tables
Database names
MediaWiki
Wikibase
Replicas browser and optimizer
Login
History
Fork
Fork of
Which languages have the most terms with redundant head parameter
by
Erutuon
This query is marked as a draft
This query has been published
by
Erutuon
.
Toggle Highlighting
SQL
select language_name, count, lemma_count, nonlemma_count, round(cast(count as float) / cast(lemma_count + nonlemma_count as float), 2) as fraction from ( select language_name, count(*) as count from ( select substring(cl_to, 1, instr(cl_to, '_terms_with_redundant_head_parameter') - 1) as language_name from categorylinks where cl_to like '%\_terms\_with\_redundant\_head\_parameter' ) as category_appearances group by language_name order by count desc ) as languages left join ( select entry_language, count(*) as entry_count from ( select substring(cl_to, 1, coalesce(nullif(instr(cl_to, '_lemmas'), 0), instr(cl_to, '_non-lemma_forms')) - 1) as entry_language, cl_from from categorylinks where cl_to like '%\_lemmas' or cl_to like '%\_non-lemma\_forms' ) as entries group by entry_language, cl_from ) as entries left join ( select lemma_language, count(*) as lemma_count from ( select substring(cl_to, 1, instr(cl_to, '_lemmas')- 1) as lemma_language, cl_from from categorylinks where cl_to like '%\_lemmas' ) as lemmas group by lemma_language, cl_from ) as lemmas on lemma_language = language_name left join ( select nonlemma_language, count(*) as nonlemma_count from ( select substring(cl_to, 1, instr(cl_to, '_non-lemma_forms')- 1) as nonlemma_language, cl_from from categorylinks where cl_to like '%\_non-lemma\_forms' ) as nonlemmas group by nonlemma_language, cl_from ) as nonlemmas on nonlemma_language = language_name;;;
By running queries you agree to the
Cloud Services Terms of Use
and you irrevocably agree to release your SQL under
CC0 License
.
Submit Query
Stop Query
All SQL code is licensed under
CC0 License
.
Checking query status...