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

SQL

AخA
 
use fawiki_p;
select rev_user_text, rev_year, sum(rev_id) / (1024 * 1024) content_added
from
(
select
  new.rev_id,
  substr(new.rev_timestamp, 1, 4) rev_year,
  new.rev_user_text,
  case
    when old.rev_len is null then new.rev_len
    when new.rev_len > old.rev_len then new.rev_len - old.rev_len
    else null
  end expansion
from revision new
join page
  on new.rev_page = page_id
left join revision old
  on old.rev_id = new.rev_parent_id
left join user_groups
  on ug_user = new.rev_user
  and ug_group = 'bot'
where
  page_namespace = 0
  and ug_user is null
  and new.rev_user_text in (
    select rev_user_text from
    (
      select rev_user_text, count(*)
      from revision
      where rev_user <> 0
      group by rev_user_text
      having count(*) > 15000
      order by 2 desc
    ) users_by_edits
  )
) exp
group by rev_user_text, rev_year
order by content_added 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...