Replicas browser and optimizer
This query is marked as a draft
This query has been published
USE plwiki_p; SELECT log.log_title as gets_thx, log.log_user_text as gives_thx, COUNT(*) as cnt FROM logging as log, ( SELECT log_title as user, COUNT(*) as cnt_gets FROM logging WHERE log_type="thanks" GROUP BY log_title ) as gets, /*those who were thanked by someone*/ ( SELECT log_user_text as user, COUNT(*) as cnt_gives FROM logging WHERE log_type="thanks" GROUP BY log_user_text ) as gives /*those who thanked to someone*/ WHERE log.log_type="thanks" AND gets.cnt_gets > 10 AND gets.cnt_gets + gives.cnt_gives > 20 AND gives.user = log.log_user_text AND gets.user = log.log_title GROUP BY log_title, log_user_text ORDER BY gets_thx ASC, cnt DESC
By running queries you agree to the
and you irrevocably agree to release your SQL under
All SQL code is licensed under
Checking query status...
Report a bug!
Wikimedia Cloud VPS
, written in