GROUP BY HAVING Syntax in Snowflake

Filters rows produced by GROUP BY that do not satisfy a predicate.

Example:

select department_id from employees
group by department_id
having count(*) < 10;
SELECT LastName, SUM(PointsScored) AS ps
FROM Roster
GROUP BY LastName
HAVING ps > 0;

nVector

posted on 04 Oct 19

Enjoy great content like this and a lot more !

Signup for a free account to write a post / comment / upvote posts. Its simple and takes less than 5 seconds