Hi,
I have 2 tables. In one table(Invoice table) have records of customer , the product they subscribed and the amount they paid and period they subscribed and the number of products they subscribed. The second table is---Each time a existing customer renews the subscription the previous purchace is moved to the second table(Archive table).
Now I need two queries
1. To calculate the number of products they subscribed in 2013
2.The amount they paid for 2013. If the subscription period is between Aug 2012 and Aug 2013. Then I need to claculate the amount only from jan 2013 till Aug 2013.
please help me get the answer.
Thanks
I have 2 tables. In one table(Invoice table) have records of customer , the product they subscribed and the amount they paid and period they subscribed and the number of products they subscribed. The second table is---Each time a existing customer renews the subscription the previous purchace is moved to the second table(Archive table).
Now I need two queries
1. To calculate the number of products they subscribed in 2013
2.The amount they paid for 2013. If the subscription period is between Aug 2012 and Aug 2013. Then I need to claculate the amount only from jan 2013 till Aug 2013.
please help me get the answer.
Thanks