Code Snippets

SQL HAVING command used with GROUP BY Command



The advantage of using HAVING command is it can be used in aggregate functions like count, max etc.

SELECT category, type , count( * ) as total FROM `documents` GROUP BY category, type HAVING total < 3

Share

Thanks for reading my blog. If you like what I write, why not subscribe to my feed?

If you are busy, I can send the latest post to your email. Just subscribe to my email updates.

 

Enter your email address:

Delivered by FeedBurner

Discussion

No comments for “SQL HAVING command used with GROUP BY Command”

Post a comment