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

SQL

AخA
 
SELECT actor_name AS thanker,COUNT(*) FROM (SELECT DISTINCT log_title FROM logging lg2 WHERE lg2.log_actor=lg.log_actor) AS thankees
FROM logging lg
INNER JOIN actor ac ON lg.log_actor=ac.actor_id
WHERE lg.log_type='thanks'
    AND (lg.log_timestamp BETWEEN '20210000000000' AND '20220000000000')
GROUP BY thanker
ORDER BY thankees DESC
LIMIT 10;
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...