|Issue tags:||Needs tests|
In the last few weeks I tried to make the "group by" clause work properly, but after applying patches and upgrades I'm still unable to build the proper query by UI.
For what I understand what is not working in the sql is that the field on which I'm doing the SUM is also in the GROUP BY clause so equal numbers are summed but different are not.
So now I'm trying to modify this last bit by hand. I was hoping that by intercepting $query with hook_views_query_alter() I could be able to take the GROUP BY clause, strip out the unnecessary field, and let it go back into the stream.
The problem is that I can't see how to do that, the $query object I find has no Group By clause. Where should I look?