SQL code: select SNO,avg(isnull(score,0)) from SC where SNO in (select SNO from SC where score <60 group by SNO having count(*)>=2)group by SNO;
http://blog.csdn.net/fredrickhu/archive/2009/09/25/4592668.aspx À÷º¦£¬Ð»Ð»´ó¼Ò£¡£¡ ==ÎÒÏë²éѯµÄÊÇѧÉúµÄÐÕÃû²»ÊÇѧÉúµÄѧºÅŶ SQL code: select S.SNAME,avg(isnull(SC.score,0)) from SC JOIN S ON SC.SNO=S.SNO where SC.SNO in (select SNO from SC where score <60 group by SNO having count(*)&