This query is marked as a draft This query has been published by Base.

SQL

AخA
 
use ukwiki_p;
select distinct rev.rev_user_text as "Автор",
(
  select count(*) from revision_userindex r where r.rev_timestamp >= 20170101000000 and r.rev_user_text = rev.rev_user_text 
) as "Редагувань цьогоріч",
(
  select count(*) from revision_userindex r where (r.rev_timestamp between 20160101000000 and 20161231235959) and r.rev_user_text = rev.rev_user_text 
) as "Редагувань минулоріч"
from categorylinks
join page pt on cl_to = "Статті_заходу_«Бібліотечний_ВікіДень»" and cl_type = "page"
and cl_from = pt.page_id and pt.page_namespace = 1
join page pa on pt.page_title = pa.page_title and pa.page_namespace = 0
join revision rev on pa.page_id = rev.rev_page and rev.rev_parent_id = 0
order by "Редагувань цьогоріч" desc
By running queries you agree to the Cloud Services Terms of Use and you irrevocably agree to release your SQL under CC0 License.
All SQL code is licensed under CC0 License.

Checking query status...