摘要: 一、查询季度平均sql语句如下:selectjidu,avg(num)from(select*,casewhenid<4then1whenid<7then2when(id>6andid<10)then3whenid>9then4endasjidufromtest1)test1newgroupbyjidu二、查询第三名学生信息select * from (select *,row_number() over(order by score desc)as cid from status)aawhere aa.cid=3解释:status:学生信息表(id,score) 阅读全文
posted @ 2013-02-07 11:40 觉信 阅读(471) 评论(1) 推荐(0) 编辑