This query is marked as a draft This query has been published by Achim55.

SQL

AخA
 
USE commonswiki_p; 
SELECT
  cattmp.cl_to,
  cattmp.cl_count,
  user_name,
  log_timestamp,
  log_comment
FROM logging
JOIN `user` ON log_user = user_id
JOIN
(SELECT cl_to, COUNT(cl_to) AS cl_count
 FROM categorylinks
 LEFT JOIN page ON cl_to = page_title
 AND page_namespace = 14
 WHERE page_title IS NULL
 GROUP BY cl_to) AS cattmp
ON log_title = cattmp.cl_to
WHERE log_namespace = 14
AND log_type = "delete"
AND log_timestamp = (SELECT MAX(log_timestamp)
                     FROM logging AS last
                     WHERE log_namespace = 14
                     AND cattmp.cl_to = last.log_title)
LIMIT 100;
By running queries you agree to the Cloud Services Terms of Use and you irrevocably agree to release your SQL under CC0 License.
All SQL code is licensed under CC0 License.

Checking query status...