Friday, 22 April 2016

What is GROUP BY ? WHERE vs. HAVING clause


The GROUP BY keywords have been added to SQL because aggregate functions (like SUM, AVG, MAX) return the aggregate of all column values every time they are called.
Without the GROUP BY functionality, finding the sum for each individual group of column values was not possible.


WHERE vs. HAVING
HAVING clause is used only with GROUP BY functions whereas Where is not used with. 

No comments:

Post a Comment

Note: only a member of this blog may post a comment.