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
Diego Queiroz
.
Toggle Highlighting
SQL
use ptwiki_p; set @total_edit_rank = 0; set @unique_users_rank = 0; SELECT t.* , @unique_users_rank := @unique_users_rank + 1 AS unique_users_rank FROM ( SELECT t.* , @total_edit_rank := @total_edit_rank + 1 AS total_edit_rank FROM ( SELECT page.page_title , COUNT(*) AS total_edits , COUNT(DISTINCT rev_user_text) AS unique_users FROM revision INNER JOIN page ON (revision.rev_page = page.page_id) WHERE rev_timestamp LIKE '2016%' and page.page_namespace = 0 GROUP BY rev_page ) t ORDER BY t.total_edits DESC ) t WHERE (total_edit_rank <= 100) or (unique_users_rank <= 100) ORDER BY t.unique_users DESC;
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...