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
SELECT receiver.log_title AS userName, COALESCE(sent.thanksSent, 0) AS thanksSent, COALESCE(receiver.thanksReceived, 0) AS thanksReceived FROM ( SELECT log_title, COUNT(*) AS thanksReceived FROM logging_logindex WHERE log_action = 'thank' AND log_title = 'WikiBayer' GROUP BY log_title ) receiver LEFT JOIN ( SELECT actor.actor_name, COUNT(*) AS thanksSent FROM logging_logindex JOIN actor ON logging_logindex.log_actor = actor.actor_id WHERE log_action = 'thank' AND actor.actor_name = 'WikiBayer' GROUP BY actor.actor_name ) sent ON receiver.log_title = sent.actor_name;
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...