Halloween Sale: Flat 70% + Addl. 25% Off + 30 Days Extra Lab on all Courses | Use Coupon HS25 in Checkout | Offer Expires In

  Enroll Now

HAVING clause

It works as WHERE clause for aggregate functions.

Example - You need to know city wise max salaries of employees where the max salary is more than 2150.

select max(e.empsal) max_sal, d.depcity
from emp e, deptt d
where e.depid = d.depid
group by d.depcity
having max(e.empsal) > 2150 -- to show max sal > 2150
order by d.depcity

No hints are availble for this assesment

Answer is not availble for this assesment

Loading comments...