oracle - SQL COUNT- not a single group group function error -
i run following count(*)
query on oracle db
:
select count(*) + (select count(*) t_diagram) t_object
i following error:
not single group- group function.
i understand using aggregation methods (e.g. sum
, avg
) require group by
statement.
however, how can add group by
in select count (*)
query?
another challenge: application run query on, not suppport duals. supports select statements only. ideas?
use derived table?
select sum(cnt) ( select count(*) cnt t_object union select count(*) cnt t_diagram ) dt
Comments
Post a Comment