How can I write this sql query in as hql:
select count(distinct s.id) as prepaid, count(distinct ss.id) as postpaid
from (select * from subscriber where subscriber.ispostpaid=0) s
join (select * from subscriber where ispostpaid=1) ss
where s.subscriber_status='active';
Or can make this query without using join by using only subquery.
Asked by Dev Sharma
(11 rep)
Feb 12, 2014, 11:12 AM
Last activity: Feb 13, 2014, 11:22 AM
Last activity: Feb 13, 2014, 11:22 AM