sql - HAVING at least 10

Posted by every_answer_gets_a_point on Stack Overflow See other posts from Stack Overflow or by every_answer_gets_a_point
Published on 2010-03-14T04:44:19Z Indexed on 2010/03/14 4:45 UTC
Read the original article Hit count: 428

Filed under:

i would like to display results for values that are only 10 and over

select  name, count(*) from actor
join casting on casting.actorid = actor.id
where casting.ord = 1
group  by name
order by 2 desc

that will return this:

name    count(*)
Sean Connery    19
Harrison Ford   19
Robert De Niro  18
Sylvester Stallone  18

etc

but i want to return values of count(*) that are only above 10

how do i do this? with having?

© Stack Overflow or respective owner

Related posts about sql