Link to home
Start Free TrialLog in
Avatar of donnatronious
donnatroniousFlag for United States of America

asked on

I want to do something like what is on the 4th l line of query

SELECT  max(D.delta) delta_max,
            min(D.delta) delta_low,
            round(avg(D.delta), 4) delta_avg,
            count(D.delta > .5),
            count(*) total
from(
      SELECT C.LPMIMonthlyAmt CM, B.LPMIMonthlyAmt CM2, round((B.LPMIMonthlyAmt- C.LPMIMonthlyAmt),4) as delta
      from cm.dbo.martloaninterfacedetail B join
      cm2.dbo.Account_Loan C
      on        B.LOANACCTNUM = C.AccountNumber
      where B.loanacctnum IN (SELECT A.acct
                                          from dbo.cm_loans A
                                          where A.acct IN (select acct
                                                                  from CMvCM2LoanDetailCompare
                                                                  where score & 131072 = 131072)
                                          and A.live ='1')
)as D
ASKER CERTIFIED SOLUTION
Avatar of D B
D B
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial