I need some assistance in writing a query, using Informix SQL that will, for each customer sum the amount they have spent in the FIRST 3 months AFTER they registered.
I am finding it difficult to do this in Informix. Using Oracle I would probably use the MONTHS_BETWEEN function. Is there anything similar to this in Informix. I would be grateful if anyone can give me any ponters on this.
The query looks something like this:
Select client.accountnum, client.opendate, sum(transaction.amount)
from clients, transactions
where clients.accountnum = transactions.accountnum
??? and transactions.date between client.opendate and ???
group by 1, 2
Hope this makes sense!
Thanks
Jamie
Thanks
Jamie
I am finding it difficult to do this in Informix. Using Oracle I would probably use the MONTHS_BETWEEN function. Is there anything similar to this in Informix. I would be grateful if anyone can give me any ponters on this.
The query looks something like this:
Select client.accountnum, client.opendate, sum(transaction.amount)
from clients, transactions
where clients.accountnum = transactions.accountnum
??? and transactions.date between client.opendate and ???
group by 1, 2
Hope this makes sense!
Thanks
Jamie
Thanks
Jamie