Prevent grouping by issues.state column on database query
What does this MR do?
state
column is being ignore for issues and merge_requests tables.
However it is still being used in a query where it is not needed.
For more context and information check: !25561 (comment 296328969)