1The difference between the having and
2where clause in SQL is that the where
3clause cannot be used with aggregates(max, min,count,avg,sum)
4, but the having clause can.
1HAVING clause in SQL is used to
2filter records in combination
3with the GROUP BY clause. It is
4different from WHERE, since
5WHERE clause cannot filter
6aggregated records. HAVING is a column
7operation.
8
9Select department_id, Min (Salary)
10From Employees
11Group By Department_id
12Having MIN (salary) < 3500;
13