当前位置:网站首页>Example of using listagg in Oracle 11g (splicing the values of a field into a line, separated by commas)
Example of using listagg in Oracle 11g (splicing the values of a field into a line, separated by commas)
2022-06-22 07:57:00 【CodeStorys】
LISTAGG Use example of
SELECT T1.SN,
LISTAGG(T1.ACT_NAME, ',') WITHIN GROUP(ORDER BY T1.END_TIME) AS ALL_ACT_LIST,
LISTAGG(T3.ACT_NAME, ',') WITHIN GROUP(ORDER BY T3.END_TIME) AS VALID_ACT_LIST
from TABLE_NAME T1
LEFT JOIN (SELECT * FROM TABLE_NAME T3 WHERE T3.STAT = 2 ) t3
ON t1.sn = t3.sn
and t1.stat = t3.stat
and t1.act_name = t3.act_name
and t1.end_time = t3.end_time
LEFT JOIN TABLE_NAME T2
ON T1.SN = T2.SN
WHERE T2.PROCESSING_STATUS = ' Disposed of '
group by T1.SN
order by all_act_list ,valid_act_list
边栏推荐
- Docker install mysql, hello world
- Xlua environment configuration
- mysql截取字符串CS0000_1中_后面的字符
- Kubernetes practice
- An example shows the difference between let and VaR
- 由浅入深拿下OpenFeign
- 丰田bZ4X取消上市发布会,就算低温充电问题不存在,产品力如何?
- 模电实验——实验一 晶体管共射极单管放大器
- 4 solutions de court - circuit et 2 solutions d'arbre de génération minimum
- What is distributed transaction
猜你喜欢

Kubernetes practice

数据可视化优秀案例

Mystery of power bank

Model electricity experiment -- Experiment 2 JFET common source amplifier circuit

Qualcomm platform LCM summary

Relative positioning, absolute positioning, fixed positioning

【Oracle 数据库】奶妈式教程 day14 转换函数

【Oracle 数据库】奶妈式教程 day13 日期函数

mysql查询group by 1055 问题完美解决,最简单最便捷的方法

Toyota bz4x canceled the launch conference. Even if the low-temperature charging problem does not exist, how about the product strength?
随机推荐
mapTalks:基础操作与WMS/WMTS地图服务加载
Stored procedures and functions of MySQL
Use multithreading to speed up your crawler
Qualcomm platform LCM summary
【圖論常見模板題】4種最短路解法和2種最小生成樹解法
Query where uiwebview is used in the project
Microsoft Remote Desktop 10.7.6正式版
4、 Button component
Technology blog collection
Concurrent programming summary
Docker install redis
Expérience électrique en mode - - expérience 2 circuit d'amplification de source commune JFET
(9)顺序队列与栈队列
UI draw line
Lookup encapsulation of unity monobehavior component
White paper on Web page quality of Baidu search engine guides website construction and optimization
Download addresses of Xcode versions
Docker install mysql, hello world
lr 2022超详细安装教程「最新」
(7) Bidirectional linked list