Code:
select mobile ,count(id) from (select mobile ,id from phone_1204 where astatus='newsub' and left(service,4)='euro' union all select mobile,id from phone_1205 where astatus='newsub' and left(service,4)='euro' ) group by mobile
select mobile ,count(id) from (select mobile ,id from phone_1204 where astatus='newsub' and left(service,4)='euro' union all select mobile,id from phone_1205 where astatus='newsub' and left(service,4)='euro' ) group by mobile
select @@rowcount as count, mobile ,count(id) from (select mobile ,id from phone_1204 where astatus='newsub' and left(service,4)='euro' union all select mobile,id from phone_1205 where astatus='newsub' and left(service,4)='euro' ) group by mobile
Comment