Having trouble in views creating what seems like a very simple query. Display the number (count) of nodes of a given type. I'm not finding the option in any obvious place...
How to?
You want the Views Group By module. Some more details about this module (from its project page):
This module enriches Views2 functionality with SQL Grouping and Aggregation capabilities.
Ever wanted to design a view that displays top terms for a specific node type and number of nodes for each top term? You could not build such query before, but now you can.
A new field group: SQL Aggregation is added, in Views, once you install the module. The field group has one available field: SQL Aggregation: Group By Fields. The field allows to configure many aspects of "group by" SQL clause and "count()" fields.
Currently only SQL COUNT() function is available due to a limitation in Views2 API. We are working on a Views2 patch to overcome the limitation. Patch will be submitted to Views2 project and, hopefully, applied shortly thereafter.
Maybe instead of views it is better to use light custom SQL-query, something like this http://drupal.org/node/105375#comment-1095529
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With