查询Oracle时出错:不是单组组功能

时间:2015-09-04 02:17:49

标签: oracle subquery ora-00937

我对 Oracle

进行了查询
SELECT count(*),SUM(price) as total_price,
  (SELECT count(*) as total_card_success FROM Card_trans WHERE status = 4)
FROM Card_trans;

执行时,显示错误:

ORA-00937: not a single-group group function
00937. 00000 -  "not a single-group group function"

如何解决这个问题。感谢

1 个答案:

答案 0 :(得分:2)

如果您只想计算Unicode

的行数
status = 4