當我運行下面的SQL語句:SQL組函數嵌套太深
SELECT *
FROM (SELECT ID_BARANG
ID_CUST,
MAX(JML) AS JML,
TGL_TRANSAKSI
FROM PEMBELIAN_DETIL_1301140002
NATURAL JOIN PEMBELIAN_1301140002
GROUP BY ID_TRANSAKSI
ORDER BY MAX(JML) DESC
)
WHERE ROWNUM = 1;
我獲得以下錯誤:
ERROR 4行:ORA-00935:組函數嵌套過深
有人可以幫我嗎? 謝謝
可能重複:http://stackoverflow.com/questions/16576338/sql-group-function-nested-too-deeply – lovasoa