Toggle navigation
Home
New Query
Recent Queries
Discuss
Database tables
Database names
MediaWiki
Wikibase
Replicas browser and optimizer
Login
History
Fork
Fork of
Editors preferring visual mode / wikitext mode / both / neither
by
Matma Rex
This query is marked as a draft
This query has been published
by
Matma Rex
.
Toggle Highlighting
SQL
with data1 as ( select rev_id, rev_actor, change_tag_ve.ct_id as ve, change_tag_wt.ct_id as wt from revision left join change_tag change_tag_ve on change_tag_ve.ct_rev_id=rev_id and change_tag_ve.ct_tag_id=(select ctd_id from change_tag_def where ctd_name='visualeditor') left join change_tag change_tag_wt on change_tag_wt.ct_rev_id=rev_id and change_tag_wt.ct_tag_id in (select ctd_id from change_tag_def where ctd_name in ('wikieditor','visualeditor-switched','visualeditor-wikitext')) straight_join page on rev_page=page_id left join actor on rev_actor=actor_id left join user on actor_user=user_id left join user_groups on user_id=ug_user and ug_group='bot' where rev_timestamp like '202303%' and page_namespace=0 and ug_group is null ), data2 as ( select rev_actor, count(ve) as ve, count(wt) as wt from data1 group by rev_actor ), data3 as ( select case when ve=0 and wt=0 then 'N/A' when ve=0 then 'wikitext 100%' when wt=0 then 'visual 100%' when ve > wt then 'visual >50%' when wt > ve then 'wikitext >50%' else '50%' end as txt, wt/(ve+wt) as val from data2 ) select txt, count(*) from data3 group by txt order by val
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...