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

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - Bypass Geo Redirect for specific directories -

php - .htaccess mod_rewrite for dynamic url which has domain names -