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

SQL

x
 
USE skwiki_p;
SELECT
    *
  FROM
    revision r
  WHERE
    r.rev_id = 6843027
  ORDER BY
    r.rev_timestamp;
SELECT
    *
  FROM
    revision r
  WHERE
    r.rev_page = 632422
  ORDER BY
    r.rev_timestamp;
SELECT
    p.page_id,
    (SELECT pp_value FROM page_props WHERE pp_page = page_id AND pp_propname = 'wikibase_item') as wb_item,
    p.page_title,
    p.page_len,
    (SELECT count(*) FROM langlinks WHERE ll_from = p.page_id) as iw_count,
    count(r.rev_id) as rev_count,
    rf.rev_timestamp as rev_first,
    rfa.actor_name as rev_first_user,
    rl.rev_timestamp as rev_last,
    rla.actor_name as rev_last_user,
    rf.rev_parent_id as rev_first_parent
  FROM
    page p
      LEFT OUTER JOIN revision rf ON rf.rev_page = p.page_id and rf.rev_parent_id = 0
      LEFT OUTER JOIN actor rfa ON rfa.actor_id = rf.rev_actor,
    revision r, revision rl, actor rla
  WHERE
    p.page_id = 632422 and
    r.rev_page = p.page_id and
    -- rf.rev_page = p.page_id and -- rf.rev_parent_id = 0 and
    -- rfa.actor_id = rf.rev_actor and
    rl.rev_id = p.page_latest and
    rla.actor_id = rl.rev_actor and
    p.page_namespace = 0 and
    p.page_is_redirect = 0
  GROUP BY
    p.page_id
  ORDER BY
    p.page_id
  -- LIMIT
    -- 60000
  -- OFFSET
    -- 0
    -- 60000
    -- 120000
    -- 180000
  ;
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...