If you try to group by tids you get this:

    * user warning: Unknown column 'term_node_tid' in 'group statement' query: SELECT COUNT(*) FROM (SELECT COUNT( DISTINCT(node.nid)) AS nid, COUNT(node.nid) AS node_nid FROM node node WHERE node.type in ('richiesta') GROUP BY term_node_tid ORDER BY node_nid ASC ) count_alias in .../htdocs/sites/all/modules/views/includes/view.inc on line 705.

    * user warning: Unknown column 'term_node_tid' in 'group statement' query: SELECT COUNT( DISTINCT(node.nid)) AS nid, COUNT(node.nid) AS node_nid FROM node node WHERE node.type in ('richiesta') GROUP BY term_node_tid ORDER BY node_nid ASC LIMIT 0, 10 in .../htdocs/sites/all/modules/views/includes/view.inc on line 731.

Query	

SELECT COUNT(node.nid) AS nid,
   COUNT(node.nid) AS node_nid
 FROM node node 
 WHERE node.type in ('sometype')
 GROUP BY term_node_tid
  ORDER BY node_nid ASC

I think that you can group by term name but you cannot group by tids because the term id are always obtained in a separate query...
This is a shame because if you can group by tid you can get a filtered node count per term (but this is a problem in views module not in yours)

Comments

irakli’s picture

Status: Active » Fixed

Please install the new version of the module and see if the problem goes away.

Thank you

gunzip’s picture

it looks like the problem persists (i think it's structural and there isn't an easy way to get around that).
if you chose 'taxonomy: all terms' for fields you can't actually group by those ones because the query is

SELECT node.nid AS nid, node.vid AS node_vid FROM node node

and the terms come from another query.

anyway you can circumvent this grouping by term name, selecting 'taxonomy: term' for fields
and then using a filter on the vocabulary.

irakli’s picture

Please post the detailed description of your Views configuration: which fields do you have, which relationships etc. A screenshot would be great too.

Drupal Taxonomy integration with Views never exposes tid to Views, so I am not sure how did you manage to indicate that you wanted grouping by tid?

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.