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
Robertsky
.
Toggle Highlighting
SQL
SELECT log_actor, DATE_FORMAT(STR_TO_DATE(log_timestamp, '%Y%m%d%H%i%s'), '%Y-%m-%d %H:00:00') AS timestamp, -- Grouping by hour SUM(CASE WHEN log_type = 'delete' AND log_action = 'delete' THEN 1 ELSE 0 END) AS deletions, SUM(CASE WHEN log_type = 'delete' AND log_action = 'restore' THEN 1 ELSE 0 END) AS restorations FROM logging_userindex WHERE log_timestamp > '20041223000000' AND log_timestamp < '20241224000000' GROUP BY log_actor, DATE_FORMAT(STR_TO_DATE(log_timestamp, '%Y%m%d%H%i%s'), '%Y-%m-%d %H:00:00') ORDER BY log_actor, timestamp;
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...