Rank teacher sql
一段统计通过率的SQL update pg set result='通过' where result='修改通过'
select
A.teacher,passCount,ISNULL(unPassCount,0) unPass,(passCount+ISNULL(unPassCount,0)) totalCount,(passCount*100/(passCount+ISNULL(unPassCount,0))) as pp
from(
select teacher,result,COUNT(1) passCount from pg where RTRIM(result……

