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
The Polish
.
Toggle Highlighting
SQL
USE plwiki_p; SELECT log.log_title as gets_thx, log.log_user_text as gives_thx, COUNT(*) as cnt, min(log.log_id) as log_id_min FROM logging as log, ( SELECT log_title as user, COUNT(*) as cnt_gets FROM logging WHERE log_type="thanks" AND log_id > 1200000 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" AND log_id > 1200000 GROUP BY log_user_text ) as gives /*those who thanked to someone*/ WHERE log.log_type="thanks" AND log.log_id > 1200000 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 COUNT(*) 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...