I have a SQl query, which needs to be converted to HQL query, but i am not successfull, please help me
select a.msisdn,sum(b.amount) 'amount'
from account a
inner join accrued_Transaction b on a.msisdn = b.msisdn
where a.account_group = 300 and a.opt_in_date is null and b.year <= 2010
AND b.quarter <= 2 AND (b.opted_in is null OR b.opted_in = 1)
GROUP BY b.msisdn, a.msisdn
Please, thanks in advance