Using Having clause with group by

Posted by Puneet20884 under Sql Server category on | Views : 2355
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, having Count(Id) > 10

Having is basically a condition on the aggregate function !!

Comments or Responses

Login to post response