解决方案 »
- oracle 中rman如何启动?
- 请教多表视图的 Update.
- oracle 定时任务 存储过程 临时表
- 求要比test1中的date_time小且最近的日期在test2中
- 如何通过Sql语句将一个数值型字段转化为日期类型
- 缺少OCI.DLL文件,怎么办?
- *专家高手问题*oracle 驱动问题!
- 大家经常提到的关于update问题(exists(select 1 from temp_xdata b where b.userid = 1 and b.colname = 'mcxh' and a.mcnbxh = b.olddat
- 哪里可以下载pl/sql developer 5.1.3的零售版和注册机
- 关于oracle卸载的问题
- 请问,Oracle9i和10g有什么不同.
- 请问怎么把下面的sql server的sql改成oracle的?在线等,谢谢!
t2.name,
ltrim(max(SYS_CONNECT_BY_PATH(t2.invoice, ',')), ',') col,
max(t2.amt) amt
from (select t.*,
ROW_NUMBER() OVER(PARTITION BY t.id, t.name ORDER BY t.invoice) AS RN,
sum(t.stl_count) over(partition by t.id, t.name order by t.invoice) as amt
from test t) t2
start with rn = 1
connect by prior rn = rn - 1
and prior t2.id = t2.id
group by t2.id, t2.name
order by t2.id;
SELECT STL_ID,STL_NAME,
WM_CONCAT(STL_INVOICE) STL_INVOICE,
SUM(STL_COUNT) STL_COUNT
FROM TABLE1
GROUP BY STL_ID,STL_NAME
ORDER BY STL_ID,STL_NAME
select
stl_id,stl_name,wm_concat(stl_invoice) stl_invoice ,sum(stl_count) stl_count
group by stl_id,stl_name
order by stl_id,stl_name;
10G上的版本wm_concat
11g listagg