Index...
Centrallix Documentation
|
6.6 HAVING Clause
The HAVING Clause
Centrallix supports a HAVING clause, which permits selecting certain rows after grouping has been performed. The WHERE clause selects rows before grouping is performed. Thus, the HAVING clause can include aggregate fields in its criteria.
Example:
SELECT :f:owner, total = sum(:f:size)
FROM /public/directory f
WHERE :f:last_modification > convert(datetime, 'Jan 1 2006')
GROUP BY :f:owner
HAVING :total > (1024 * 1024)
(Note: currently a HAVING clause can be used with INSERT INTO ... SELECT, but cannot be used with a DELETE statement.)
Comments...
(none yet)
Add a Comment...
|