The most simple example I could think up was averaging node.nid grouped by node.type.
The SQL results in this -
SELECT node.type AS node_type, node.nid AS nid, AVG(node.nid) AS nid_1 FROM node node GROUP BY node_type, nid
And the SQL should read as this -
SELECT node.type AS node_type, node.nid AS nid, AVG(node.nid) AS nid_1 FROM node node GROUP BY node_type
Notice nid is placed after the GROUP BY statement in the first example while the second example only has node_type after the GROUP BY statement.
I attached the Views definition of my test.
Comments
Comment #1
dawehnerThe problem was that you checked the node: type field to display a link to the node.
Try this export and it will work.
Comment #2
R.J. Steinert commentedLogically, I can see how having that option checked might cause problems. The problem is, "Link this field to its node" is checked by default, and unchecking is not an obvious work around. Is it possible for the "Use grouping" feature to override "Link this field to its node"?
Comment #3
dawehnerNot really easy.
Just remove the link and all is fine.
Comment #4
R.J. Steinert commentedThanks for the help dereine :)
Comment #6
jmolinas commentedI encounter the same problem using GROUP BY in SQL
GROUP BY users_name, node_data_field_branch_sales_quantity_field_branch_sales_qua_1
SQL Should be this;
GROUP BY users_name