Limitations of GROUP BY

From InterBase

When using GROUP BY, be aware of the following limitations:

  • Each column name that appears in a GROUP BY clause must also be specified in the SELECT clause.
  • GROUP BY cannot specify a column whose values are derived from a mathematical, aggregate, or user-defined function.
  • GROUP BY cannot be used in SELECT statements that:
  • Contain an INTO clause (singleton selects).
  • Use a subquery with a FROM clause which references a view whose definition contains a GROUP BY or HAVING clause.
  • For each SELECT clause in a query, including subqueries, there can only be one GROUP BY clause.