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
WikiBayer
.
Toggle Highlighting
SQL
WITH latest_logs AS ( SELECT log_type, log_action, log_id, log_timestamp, log_title, ROW_NUMBER() OVER (PARTITION BY log_type, log_action ORDER BY log_id DESC) AS row_num FROM logging JOIN actor ON logging.log_actor = actor.actor_id WHERE log_type NOT IN ('newusers', 'thank', 'upload', 'create', 'review', 'move', 'spamblacklist', 'pagetranslation', 'translationreview') AND actor.actor_name = 'WikiBayer' AND log_action NOT IN ('autopromote', 'move_prot') ), log_count AS ( SELECT log_type, log_action, COUNT(*) AS total_count FROM logging JOIN actor ON logging.log_actor = actor.actor_id WHERE actor.actor_name = 'WikiBayer' GROUP BY log_type, log_action ) SELECT l.log_type, l.log_action, l.log_timestamp, l.log_title, l.log_id, lc.total_count FROM latest_logs l JOIN log_count lc ON l.log_type = lc.log_type AND l.log_action = lc.log_action WHERE l.row_num = 1 ORDER BY l.log_type, l.log_action, l.log_timestamp 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...