Home » SQL & PL/SQL » SQL & PL/SQL » [RAVI] ORA-00937: not a single-group group function
[RAVI] ORA-00937: not a single-group group function [message #893] Mon, 11 March 2002 11:24 Go to next message
Ravi
Messages: 251
Registered: June 1998
Senior Member
Hi,

I wanted to count number of record per day for a week,
I am getting following error, Pl help me if you know answer., Thanks a lot

SELECT TO_CHAR(create_date,'MM-DD-YY'),count(*) FROM message WHERE msg_name='FISUpdateError' and create_date > sysdate -8
*
ERROR at line 1:
ORA-00937: not a single-group group function
Re: [RAVI] ORA-00937: not a single-group group function [message #894 is a reply to message #893] Mon, 11 March 2002 11:32 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
try this
SELECT TO_CHAR(create_date,'MM-DD-YY'),count(*) FROM message WHERE msg_name='FISUpdateError' and create_date > sysdate -8
group by create_date
Re: [RAVI] ORA-00937: not a single-group group function [message #900 is a reply to message #893] Mon, 11 March 2002 23:02 Go to previous messageGo to next message
THA
Messages: 26
Registered: February 2002
Junior Member
hello
the query is perfect. no need to trim. just use the function sum instead of count.
thanks
Re: [RAVI] ORA-00937: not a single-group group function [message #916 is a reply to message #893] Tue, 12 March 2002 19:06 Go to previous message
Jim Willis
Messages: 11
Registered: October 2001
Junior Member
try "TRUNC"
SELECT TO_CHAR(TRUNC(create_date,'MM-DD-YY')),count(*) FROM message
WHERE msg_name='ExodusUpdateError' and
create_date > sysdate -8
group by create_date
Previous Topic: eliminating rows when more than one rows has been returned
Next Topic: sqlldr
Goto Forum:
  


Current Time: Thu Apr 25 00:16:21 CDT 2024