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
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
Thanks for reading my blog. If you like what I write, why not subscribe to my feed?
|
Discussion
No comments for “SQL HAVING command used with GROUP BY Command”