What is the difference between the where and Having clause when used along with the select statement. Explain with an example.

Example 1: difference between where and having clause

The difference between the having and
where clause in SQL is that the where
clause cannot be used with aggregates(max, min,count,avg,sum)
, but the having clause can.

Example 2: difference between where and having clause

The difference between the having and
where clause in SQL is that the where 
clause cannot be used with aggregates,
but the having clause can.

Tags:

Sql Example