1
Reply

Tell Me Solun for this query

Ask a question

This is my query

select a.advisor_id,c.plan_Name,sum(a.premium_amount+a.carry_amount) as Business,d.target,(sum(a.premium_amount+a.carry_amount)*(d.target/100)) as Total from tbl_payment_master as a inner join tbl_user_Registration as b on a.user_Id=b.user_Id inner join tbl_planTypes as c on c.plan_Id=b.plan_Id inner join tbl_planTargets as d on d.plan_Id=c.plan_Id and d.plan_Id=b.plan_Id where a.advisor_id=2 and month(a.paid_date)=10 and year(a.paid_date)=2012 group by a.advisor_id,c.plan_Name,d.target,b.payment_Mode having (case when b.payment_Mode=1 then (((a.No_Of_Due)*1)) end)<=12

But I dont need a.no_of_due is not in group by statement how to use without groupby statement on a.no_of_due
 


Answers (1)