Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Query Help

Dear Experts,

I want to create query for,

Customer who has spent less than or equal to £10k revenue within las 12 months.

Can any one tell me?

Thanks,

Former Member
replied

Try this

SELECT T0.CardCode, MAX(T0.Cardname) as Customer,  SUM(T0.doctotal) as "Amount(LC)"

FROM OINV T0

WHERE

T0.[DocDate]  > =[%0] and  T0.[DocDate] <=[%1]

GROUP BY T0.CardCode

having sum(T0.Doctotal) <= '10000'

Order by SUM(T0.doctotal) DESC

--Manish

0 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question