Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 "not a single-group group function"

Author  Topic 

Bencze
Starting Member

2 Posts

Posted - 2015-02-12 : 03:20:08
Hi,

i have a code like this:

SELECT Node_ID,Day,Operation, AA,BB
FROM
(SELECT
CASE
WHEN Operation LIKE 'NOTIFY' THEN SUM(Total_request) ELSE 0 END AS AA,
CASE WHEN OPERATION LIKE 'SEARCH' THEN SUM(Total_requests) ELSE 0 END AS BB,Node_ID,DAY,Operation
FROM
(SELECT
TO_CHAR(STARTTIME, 'YYYY-MM-DD') AS day,
TO_CHAR(STARTTIME, 'HH24:MI') AS time,
Node_ID,
Operation,
Total_requests
FROM requests
WHERE STARTTIME >= TO_DATE('20150206', 'YYYYMMDD')
AND STARTTIME < TO_DATE('20150213', 'YYYYMMDD')
))
GROUP BY Node-ID, Day, AA,BB


So i want to make two columns by the name of operation. in the real code AA and BB are calculates with many counters. my code doesnt work,i have an error: "not a single-group group function"
could you help me what is the problem?
thanks,

Bencze
Starting Member

2 Posts

Posted - 2015-02-12 : 04:49:55
it's OK now,question is obsolete. :)
Go to Top of Page
   

- Advertisement -