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

SQL

x
 
SELECT COUNT(1) as pages_by_bots
FROM ukwiki_p.user_groups UG
  JOIN ukwiki_p.revision R ON UG.ug_user = R.rev_user
  JOIN ukwiki_p.page P ON R.rev_page=P.page_id
WHERE UG.ug_group = "bot"
  AND R.rev_parent_id = 0
  AND P.page_namespace = 0
UNION
SELECT COUNT(1) as pages_by_former_bots
FROM ukwiki_p.user_former_groups UFG
  JOIN ukwiki_p.revision R2 ON UFG.ufg_user = R2.rev_user
  JOIN ukwiki_p.page P2 ON R2.rev_page=P2.page_id
WHERE UFG.ufg_group = "bot"
  AND R2.rev_parent_id = 0
  AND P2.page_namespace = 0
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...