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
Kalli navya
.
Toggle Highlighting
SQL
WITH months AS ( SELECT 1 AS month UNION SELECT 2 UNION SELECT 3 UNION SELECT 4 UNION SELECT 5 UNION SELECT 6 UNION SELECT 7 UNION SELECT 8 UNION SELECT 9 UNION SELECT 10 UNION SELECT 11 UNION SELECT 12 ), years AS ( SELECT DISTINCT YEAR(rev_timestamp) AS year, rev_page FROM revision #JOIN page ON rev_page = page_id #WHERE page_is_new = 1 ), months_years AS ( SELECT month, year FROM months CROSS JOIN years ), revisions AS ( SELECT COUNT(DISTINCT rev_id) AS count, MONTH(rev_timestamp) AS month, YEAR(rev_timestamp) AS year FROM revision JOIN page ON rev_page = page_id WHERE page_is_new = 1 GROUP BY YEAR(rev_timestamp), MONTH(rev_timestamp) ) SELECT my.year, my.month, COALESCE(r.count, 0) AS count FROM months_years my LEFT JOIN revisions r ON my.year = r.year AND my.month = r.month ORDER BY my.year, my.month;
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...