zoukankan
html css js c++ java
Oracle开发›如何取出每个分组的第一条记
<ignore_js_op>
截屏图片 (2).jpg
(43.34 KB, 下载次数: 21)
下载附件
2012-11-7 12:36 上传
如何取出每个分组的第一条记录(黄色背景),谢谢!!!
如何
,
记录
,
黄色
相关帖子
本版精华
【大话IT】以“数据”的名义竞技,国产数据库如何突围?
【大话IT】如何用算法学习判定“红楼梦(下)”原作者?
【大话IT】盘点数据泄露那些事儿,如何做好安全防御?
【大话IT】全闪存时代到来,你的存储如何定制?
浪潮K-DB的使用中,如何进行数据权限的划分?
如何才能百分百中奖
【大话IT】企业级SSD市场洗牌继续 磁盘已死是否言之过早?
15张图文告诉你,初创公司如何做好融资PPT
【大话IT】百信银行开启“金融+互联网”的全新模式,互联网金融该如何落地?
双十一后如何安慰女人
使用道具
举报
回复
smarck
论坛徽章:
21
2
#
发表于 2012-11-7 12:56
|
只看该作者
本帖最后由 smarck 于 2012-11-7 13:56 编辑
select t.name1,t.name2,t.zx
from (select row_number()over(partition by name1 order by zx desc)rn, test.* from test)t
where t.rn=1;
用rank的话你zx有值相等的,还是用row_number好了
使用道具
举报
回复
fwpmsy
论坛徽章:
0
3
#
楼主
|
发表于 2012-11-7 14:40
|
只看该作者
谢谢!!
使用道具
举报
回复
LuiseDalian
认证徽章
论坛徽章:
82
4
#
发表于 2012-11-7 22:56
|
只看该作者
row_number()不错。
查看全文
相关阅读:
cmd登录系统用户
Js操作Cookie
Tomcat 调优方案
Oracle 服务启动关闭
Mysql服务启动与关闭
JSP中的隐含对象
JSP指令
Js的String对象
js排序
MyBatis系列目录--5. MyBatis一级缓存和二级缓存(redis实现)
原文地址:https://www.cnblogs.com/telwanggs/p/6762903.html
最新文章
JS判断是否在微信浏览器打开
函数式编程--响应式编程 ---android应用例子
[编译]响应式编程范式--(1)
一个App架构例子分析--UI层使用MVP模式;各层之间使用Otto实现通信
MVP应用在android app上
Item 30 用enum代替int常量类型枚举,string常量类型枚举
Item 29 优先考虑类型安全的异构容器
Item 28 利用有限制通配符来提升API的灵活性
Item27--优先考虑泛型方法
Item 12 考虑实现Comparable接口
热门文章
Item 11 谨慎地覆盖Clone
个人作业1评分
个人作业1
测试驱动开发(TDD)
2016-2017(2)软工总结——工程没有捷径
个人附加作业
团队作业10——复审与事后分析(Beta版本)
团队作业9——测试与发布(Beta版本)
团队作业8——第二次项目冲刺(Beta阶段)
个人作业3——个人总结(Alpha阶段)
Copyright © 2011-2022 走看看