当前位置:网站首页>oracle 分组合并字段,每组行显示
oracle 分组合并字段,每组行显示
2022-08-03 17:31:00 【System.out.print】
效果:

实现:采用wm_concat()函数
select dateStr,wm_concat(userName) from
(
SELECT l.dateStr,u.userName,
row_number() over(partition by l.dateStr order by l.dateStr asc) su
FROM userLog l, user u
WHERE l.userId = u.id
and l.operation = 'login'
)
GROUP BY dateStr说明:
1、wm_concat()函数默认,号分割。若要用其它分隔符,可以如下使用
replace(wm_ concat(userName),',','、');
2、 row_number() over(partition by l.dateStr order by l.dateStr asc) su 这句sql是分组排序
边栏推荐
- ICDAR比赛技术分享
- 【GAMES101】作业6 加速结构
- 浅谈Service Mesh对业务系统的价值
- JS string to GBK encoding ultra-reduced implementation
- uniapp 切换 history 路由模
- 论文解读(JKnet)《Representation Learning on Graphs with Jumping Knowledge Networks》
- FinClip | July 2022 Product Highlights
- 工程仪器设备在线监测管理系统常见问题和注意事项
- The strongest distributed lock tool: Redisson
- LyScript 从文本中读写ShellCode
猜你喜欢

数据万象内容审核 — 共建安全互联网,专项开展“清朗”直播整治行动

A complete detailed tutorial on building intranet penetration ngrok (with pictures and truth)

【保姆级示例向】观察者模式

IP属地如何高效率识别

J9货币论:数字经济为全球经济复苏注入力量

JS中对象数组用sort按属性排序

目标检测-YOLOv3理论讲解

node connection mongoose database process

Crack:WebKitX ActiveX and WebKitX VHX

分享 14 个你必须知道的 JS 函数
随机推荐
Huawei, Lenovo, BAIC, etc. were selected as the first batch of training bases for "Enterprise Digital Transformation and Security Capability Improvement" by the Ministry of Industry and Information Te
学会 Arthas,让你 3 年经验掌握 5 年功力!
如何避免无效的沟通
“68道 Redis+168道 MySQL”精品面试题(带解析),你背废了吗?
websocket Handshake failed due to invalid Upgrade header
Detailed explanation of setting HiSilicon MMZ memory and OS memory
LeetCode·1163.按字典序排在最后的子串·最小表示法
数字资产的价值激发:NFT 质押
云图说丨初识华为云微服务引擎CSE
CAD如何自定义快捷键
mysql之的执行计划
C# 构造函数如人之影子
Description of the functional scenario of "collective storage and general governance" in the data center
论文解读(JKnet)《Representation Learning on Graphs with Jumping Knowledge Networks》
Cool open technology x StarRocks: unified OLAP analysis engine, comprehensive building digital model of OTT
华为ECS云服务器上安装Docker及部署Redis详细教程【华为云至简致远】
新“妖股”13个交易日暴涨320倍,市值3100亿美元超阿里
新特性解读 | MySQL 8.0 在线调整 REDO
每周推荐短视频:为了填补学习资源的空缺,作者专门写了本书?
“LaMDA 存在种族歧视,谷歌的 AI 伦理不过是‘遮羞布’!”