我有两张表作者和论文。如何找到有三位或更多作者的论文?我尝试使用
select distinct acnum,panum from author Where acnum >3 order by acnum;
和
select p.panum,p.title from paper p Join author a on a.panum = p.panum Group by p.panum,p.title Having count(a.acnum) >3;
答案 0 :(得分:0)
您必须在问题中更好地指定字段和表格,但通常您必须按作者进行分组并设置具有计数的条件。像
这样的东西SELECT * FROM paper JOIN author ON author ....
GROUP BY author
HAVING COUNT(*) > 3