I run the following COUNT(*) query on Oracle DB:
select count(*) + (select count(*) from t_diagram) from t_object
I get the following error:
Not a single group- group function.
I understand that using aggregation methods (e.g. SUM, AVG) require a GROUP BY statement.
However, how can I add a GROUP BY in a select COUNT (*) query?
Another challenge: The application I run the query on, does not suppport DUALs. It supports SELECT statements only. Any ideas?
COUNT(*)is an aggregate, and will be applied to each group in the query.count(*)should not give this error.select COUNT(*) from tablewon't give you this error. You must be doing something else as well. Show your full query.t_objectandt_diagram? or you need count() based on some condition?