Provide a column to grouped COUNT query
What does this MR do?
The line triggers the following warning:
DEPRECATION WARNING:
Dangerous query method (method whose arguments are used as raw SQL) called with non-attribute argument(s): "COUNT(\*) DESC".
Non-attribute arguments will be disallowed in Rails 6.1.
This method should not be called with user-provided values, such as request parameters or model attributes.
Known-safe values can be passed by wrapping them in Arel.sql().
Let's provide a column to fix this problem
Related issue: #328517 (closed)
Edited by Igor Drozdov