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

SQL

AخA
 
select
  user_name,
  count(log_id)
from
  user
  join logging_logindex on log_title = user_name
  and log_type = "thanks"
  join user_groups on ug_user = user_id
where
  ug_group = "bot"
group by
  user_name
order by
  count(log_id) desc;
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...