输入banner图图片脚本导航/分类

求标准分sql

object_id(tempdb..#tempTable) is not null Begin drop table #tempTable End SELECT TOP 1000 [校区],[学年],[考试年级],[考试类别],avg(语文含挑战) 平均分,STDEV(语文含挑战) 标准差 into #tempTable FROM [SchoolAnalyze].[dbo].[成绩分析]group by [校区],[学年],[考试年级] ,[考试类别] update [SchoolAnalyze].[dbo].[成绩分析] set [语文含挑战标准分] = ([语文含挑战] - (select 平均分 from #tempTable where 校区 = [成绩分析].校区 and 学年 = [成绩分析].学年 and 考试年级 = [成绩分析].考试年级 and 考试类别 = [成绩分析].考试类别))/ (select 标准差 from #tempTable where 校区 = [成绩分析].校区 and 学年 = [成绩分析].学年 and 考试年级 = [成绩分析].考试年级 and 考试类别 = [成绩分析].考试类别) select * from #tempTable if object_id(tempdb..#tempTable) is not null Begin drop table #tempTable End

 

求标准分sql

标签:nbsp   table   drop   bsp   _id   sql   upd   标准   object