SELECT t.C# AS 课程号,max(course.Cname)AS 课程名,isnull(AVG(score),0) AS 平均成绩 ,100 * SUM(CASE WHEN isnull(score,0)>=60 THEN 1 ELSE 0 END)/COUNT(*) AS 及格百分数 FROM SC T,Course where t.C#=course.C# GROUP BY t.C# ORDER BY 100 * SUM(CASE WHEN isnull(score,0)
Microsoft SQL Server support SQL Prompt can connect to the following versions of SQL Server: SQL Server 2014 SQL Server 2012 SQL Server 2008 SQL Server 2008 R2 SQL Server 2005 SQL Server 2000 SQL Server Express Edition Microsoft Azure SQL Database S