Using Having clause with group by

Puneet20884
Posted by Puneet20884 under Sql Server category on | Views : 2452
An example of using Having clause with group by is below :

select distinct top 20 name , Count(PId) from Members M
inner join Presentations P on M.MemberId = P.MemberId
group by P.Id,M.name having Count(Id) > 10


Having is basically a condition on the aggregate function !!

Comments or Responses

Login to post response