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

SQL

x
 
SELECT COUNT(DISTINCT actor_id) AS unique_users
FROM (
  -- 1. Uploads with log_comment_id = 44 or 144143204
  SELECT l.log_actor AS actor_id
  FROM logging l
  WHERE l.log_type = 'upload'
    AND l.log_comment_id IN (44, 144143204)
  UNION
  -- 2. Uploads with regex-matched comment_text
  SELECT l.log_actor AS actor_id
  FROM logging l
  JOIN comment c ON l.log_comment_id = c.comment_id
  WHERE l.log_type = 'upload'
    AND c.comment_text REGEXP '^Uploaded a work by .+ from .+ with UploadWizard$'
  UNION
  -- 3. Creators of pages that later had a revision with rev_comment_id = 33984
  SELECT r_first.rev_actor AS actor_id
  FROM revision r_first
  WHERE r_first.rev_parent_id = 0
    AND EXISTS (
      SELECT 1
      FROM revision r_later
      WHERE r_later.rev_page = r_first.rev_page
        AND r_later.rev_comment_id = 33984
    )
) AS all_uploadwizard_actors;
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...