select pub_id,count(title) as number
from Titles
group by pub_id
having count(title)>3其实心目的查询在数据库中是分两次查询得出结果的,第一次求出pub_id,count(title)
第二次求出>3的行。
select author,count(title)as number
from books
--where number>3
group by author
having count(title)>3