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

SQL

x
 
USE skwiki_p;
SELECT
    p.page_id,
    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,
    rf.rev_user_text as rev_first_user,
    rl.rev_timestamp as rev_last,
    rl.rev_user_text as rev_last_user
  FROM
    page p, revision r, revision rf, revision rl
  WHERE
    r.rev_page = p.page_id and
    rf.rev_page = p.page_id and rf.rev_parent_id = 0 and
    rl.rev_id = p.page_latest and
    p.page_namespace = 0 and
    p.page_is_redirect = 0
  GROUP BY
    p.page_id
  ORDER BY
    p.page_id
  ;  
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...