This discussion is archived
2 Replies Latest reply: Mar 23, 2013 6:17 PM by rp0428 RSS

Taking first SQL class & need help with error

998768 Newbie
Currently Being Moderated
Hello,
My code that works,
SELECT CUS_FNAME, CUS_LNAME, CUS_CODE, CUS_BALANCE
FROM CUSTOMER
ORDER BY CUS_LNAME DESC

My code that is not working and gets an error code "ORA-00937; not a single-group function",
SELECT CUS_FNAME, CUS_LNAME, CUS_CODE, SUM(CUS_BALANCE) AS TOTALBALANCE
FROM CUSTOMER
ORDER BY CUS_LNAME DESC

And can someone help me with correct code?
Also,
SELECT SUM(CUS_BALANCE) AS TOTALBALANCE
works by itself??

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points