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
ԱշոտՏՆՂ
.
Toggle Highlighting
SQL
WITH mymonths AS (SELECT DISTINCT DATE_FORMAT(DATE_ADD('2004-04-07', INTERVAL (t4*10000 + t3*1000 + t2*100 + t1*10 + t0) MONTH), '%Y-%m') AS mymonths_month FROM (SELECT 0 AS t0 UNION SELECT 1 UNION SELECT 2 UNION SELECT 3 UNION SELECT 4 UNION SELECT 5 UNION SELECT 6 UNION SELECT 7 UNION SELECT 8 UNION SELECT 9) AS t0, (SELECT 0 AS t1 UNION SELECT 1 UNION SELECT 2 UNION SELECT 3 UNION SELECT 4 UNION SELECT 5 UNION SELECT 6 UNION SELECT 7 UNION SELECT 8 UNION SELECT 9) AS t1, (SELECT 0 AS t2 UNION SELECT 1 UNION SELECT 2 UNION SELECT 3 UNION SELECT 4 UNION SELECT 5 UNION SELECT 6 UNION SELECT 7 UNION SELECT 8 UNION SELECT 9) AS t2, (SELECT 0 AS t3 UNION SELECT 1 UNION SELECT 2 UNION SELECT 3 UNION SELECT 4 UNION SELECT 5 UNION SELECT 6 UNION SELECT 7 UNION SELECT 8 UNION SELECT 9) AS t3, (SELECT 0 AS t4 UNION SELECT 1 UNION SELECT 2 UNION SELECT 3 UNION SELECT 4 UNION SELECT 5 UNION SELECT 6 UNION SELECT 7 UNION SELECT 8 UNION SELECT 9) AS t4 WHERE DATE_ADD('2004-04-07', INTERVAL (t4*10000 + t3*1000 + t2*100 + t1*10 + t0) MONTH) <= NOW()), editsbymonth AS (SELECT DATE_FORMAT(STR_TO_DATE(CAST(rev_timestamp AS CHAR), '%Y%m%d%H%i%s'), '%Y-%m') AS editsbymonth_month, COUNT(*) AS C FROM revision_userindex JOIN actor ON rev_actor = actor_id WHERE actor_name = 'Armineaghayan' GROUP BY editsbymonth_month) SELECT COALESCE(C, 0) AS Cc, mymonths_month, TIMESTAMPDIFF(MONTH, CONCAT(mymonths_month, '-01'), NOW()) AS MonthsAgo FROM editsbymonth RIGHT JOIN mymonths ON mymonths_month = editsbymonth_month HAVING Cc > 0 ORDER BY MonthsAgo DESC
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...