在线求助一条SQL语句 select pic_type,pic_id,sum(downs+notes) numfrom picgroup by pic_type,pic_idorder by num desc 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 select rownum 名次,pic_type,pic_id,sum(downs+notes) numfrom picgroup by pic_type,pic_idorder by num desc 这样可以吗 select pic_id, pic_type,downs,notes, dense_rank()over(partition by pic_type order by (downs+notes)) as 排名 from pic SQL> select pic_id, pic_type,downs,notes, dense_rank()over(partition by pic_type order by (downs+notes)) as 排名 from pic;PIC_ID PIC_TYPE DOWNS NOTES 排名---------- ---------- --------------------------------------- --------------------------------------- ----------1002 1 2 5 11004 1 4 5 21001 1 10 6 31006 1 10 6 31003 2 2 7 11005 2 6 5 26 rows selected select pic_id, pic_type,downs,notes, dense_rank()over(partition by pic_type order by (downs+notes) desc ) as 排名 from pic; oracle提示12560.12541 问个sql语句写法的问题,请诸位帮忙 请教各位高手,SQL一个查询需求,看是否需要个存储过程 大姐求助:如何用时间函数取某个日期的下个月的同一天的日期? sqlldr在线求 日期格式错误! 50分就这么轻松一个~~ 请大家推荐一本oracle开发方面比较经典的书籍 什么叫tns? 求助,怎么将大写中文数字转阿拉伯数字的函数 求论坛高手帮忙分析分析 关于Oracle数据文件 动态SQL中本身需要包含单引号,这个怎么转义呢????
from pic
group by pic_type,pic_id
order by num desc
这样可以吗
---------- ---------- --------------------------------------- --------------------------------------- ----------
1002 1 2 5 1
1004 1 4 5 2
1001 1 10 6 3
1006 1 10 6 3
1003 2 2 7 1
1005 2 6 5 26 rows selected