我有一份作者表,其中包含他们的姓名,书名和出版年份。从2000年到2010年的时间段。
我想选择在检查的时间间隔的每一年中发布(至少一次)的作者。我怎样才能做到这一点?请建议。
答案 0 :(得分:3)
select *
from pubs
where author in
(
select author
from pubs
where publicationYear between 2000 and 2010
group by
author
having
count(distinct publicationYear) = 11
)