Toggle navigation
Home
New Query
Recent Queries
Discuss
Database tables
Database names
MediaWiki
Wikibase
Replicas browser and optimizer
Login
History
Fork
This query is marked as a draft
This query has been published
by
Grte2209
.
Toggle Highlighting
SQL
#Use Pennsylvania German Wikipedia #USE pdcwiki_p; #distinct editors who have edited each article (U) #SELECT rev_page, page_title, COUNT(DISTINCT rev_user) AS U_Distinct_Editors_Each_Article FROM revision JOIN page ON rev_page = page_id GROUP by rev_page; #number of revisions of each article (E) #SELECT rev_page, page_title, COUNT(rev_id) AS E_Number_Revisions_Each_Article FROM revision JOIN page ON rev_page = page_id GROUP by rev_page DESC; #length of the article in bytes (L) #SELECT rev_page, page_title, COUNT(page_len) AS L_Length_Article_In_Bytes FROM revision JOIN page ON rev_page = page_id GROUP by rev_page DESC; #length of talk pages (T) #SELECT rev_page, page_title, COUNT(page_namespace) AS T_Length_Talk_Pages FROM revision JOIN page ON rev_page = page_id GROUP by rev_page DESC; #Is redirect? #SELECT rev_page, page_title, (page_is_redirect) AS Redirect_Page FROM revision JOIN page ON rev_page = page_id GROUP by rev_page DESC; ##Join search queries #USE pdcwiki_p; SELECT rev_page, page_title, COUNT(DISTINCT rev_user) AS U_Distinct_Editors_Each_Article, COUNT(rev_id) AS E_Number_Revisions_Each_Article, COUNT(page_len) AS L_Length_Article_In_Bytes, COUNT(page_namespace) AS T_Length_Talk_Pages, page_is_redirect AS Redirect_Page FROM revision JOIN page ON rev_page = page_id GROUP by rev_page USE pdcwiki_p; SELECT T1.rev_page, T2.page_title, T1.U, T1.E, T2.LT, T2.page_namespace, T2.redirect FROM (SELECT rev_page, COUNT(DISTINCT rev_user) AS U, COUNT(rev_id) AS E FROM revision GROUP BY rev_page) AS T1 JOIN (SELECT page_id, page_title, page_namespace , page_len AS LT, page_is_redirect AS redirect FROM page WHERE page_namespace = "0" OR page_namespace = "1") AS T2 ON (T1.rev_page = T2.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
.
Submit Query
Stop Query
All SQL code is licensed under
CC0 License
.
Checking query status...