摘要: 1.查询出编号为01的课程比02的课程的成绩高的人 select a.s_id,a.s_core s1,b.s_core s2,t.s_name FROM(select c_id,s_core,s_id from score where c_id='01')as aINNER JOIN(select 阅读全文
posted @ 2020-03-06 16:00 红尘沙漏 阅读(145) 评论(1) 推荐(0) 编辑
摘要: 1.列转行 select class_id,MAX(CASE kemu when '语文' then score ELSE 0 end)as '语文' ,MAX(CASE kemu when '数学' then score ELSE 0 end)as '数学' ,MAX(CASE kemu when 阅读全文
posted @ 2020-03-06 10:41 红尘沙漏 阅读(1060) 评论(0) 推荐(0) 编辑