i want count(*)
from two different tables and a value from third table
like this:
table A: select count(*) from TABLE_A where grp_id = 1
table B: select count(*) from TABLE_B where grp_id = 1
table C: select totalcount from TABLE_C where grp_id = 1 and AND UserID = 1
so , i framed this query:
select ifnull((select count(*) from TABLE_A where grp_id = 1),0) + ifnull((select count(*) from TABLE_B where grp_id = 1),0)
will it be efficient way to do?