Toggle navigation
Home
New Query
Recent Queries
Discuss
Database tables
Database names
MediaWiki
Wikibase
Replicas browser and optimizer
Login
History
Fork
This query is marked as a draft
This query has been published
by
Amire80
.
Toggle Highlighting
SQL
use tawiki_p; set @dbname = 'tawiki'; set @ct_tag_id = ( select ctd_id from change_tag_def where ctd_name = 'contenttranslation' ); set @created_total = ( select count(rev_id) from page, revision where page_id = rev_page and page_namespace = 0 and rev_timestamp like '201701%' and rev_parent_id = 0 ); set @created_cx = ( select count(rev_id) from change_tag, page, revision where page_id = rev_page and page_namespace = 0 and rev_id = ct_rev_id and rev_timestamp like '201701%' and rev_parent_id = 0 and ct_tag_id = @ct_tag_id ); set @created_non_cx = ( select (@created_total - @created_cx) ); set @deleted_total = ( select count(ar_id) from archive where ar_namespace = 0 and ar_timestamp like '201701%' and ar_parent_id = 0 ); set @deleted_cx = ( select count(ar_id) from change_tag, archive where ar_namespace = 0 and ar_timestamp like '201701%' and ar_parent_id = 0 and ct_tag_id = @ct_tag_id and ar_rev_id = ct_rev_id ); set @deleted_non_cx = ( select (@deleted_total - @deleted_cx) ); select @dbname, concat(((@deleted_cx / @created_cx) * 100), '%') deleted_cx_ratio, concat(((@deleted_non_cx / @created_non_cx) * 100), '%') deleted_non_cx_ratio;
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...