Hello.
I am using a subquery trying to grab the most recent data, but, having no luck in doing so.
Here is the normal query, that I am able to get the information:
Select
ccr.RateIndexRate + ccr.RateIndexMargin,
Max(ccr.LastModifiedDate)
From
CreditCardSplitRateDetail ccr
Where
ccr.RateIndexID = 1
AND ccr.SR_RateTypeIndex = 0
AND ccr.SR_BalanceTypeIndex = 0
Group By
ccr.RateIndexRate,
ccr.RateIndexMargin
I need this in a subquery, but , can't seem to wrap my head on how to do it.
(Select Case When Max(ccr.LastModifiedDate) Then Max(ccr.RateIndexRate + ccr.RateIndexRate) Else 0 End From CreditCardSplitRateDetail ccr Where ccr.MemberNumber = ln.MemberNumber AND ccr.LoanNumber = ln.LoanNumber AND ccr.RateIndexID = 1 AND ccr.SR_RateTypeIndex = 0 AND ccr.SR_BalanceTypeIndex = 0)