我想使用嵌套 SELECT 将 code_2 的结果转换为 code_1 的结果。你能帮我做这件事吗?我使用数据库 - Oracle PL/SQL Developer 提前非常感谢
代码_1:
SELECT DISTINCT eventattribute1
FROM table1 partition(m201302)
WHERE eventattribute22 = 'EURO'
AND eventattribute13 = 'MC_PO_ROAM'
AND eventattribute14 != 'T'
AND event_cost != '0'
GROUP BY eventattribute1
代码_2:
SELECT Numtodsinterval(Sum(To_char(To_date(duration, 'HH24:MI:SS'),
'HH24') *
3600 +
To_char(
To_date(duration, 'HH24:MI:SS'),
'MI')
* 60 +
To_char(To_date(duration,
'HH24:MI:SS'), 'SS')), 'second') AS
SUMTOTAL
FROM table1 partition(m201302)