I have 2 tables. One for customer details. With customer ID,Company Name, Customer Name and Address.
The other for sales details with Order ID, Customer ID, salesprice and sales date.
I would like to have a list of customer ID, Company name,total sales last year(sum of salesprice for 2013), Total sales till date(Jan 2014 til now). All should include customers details who have not made any sale as well.
Please help me get the right query.
Thanks
The other for sales details with Order ID, Customer ID, salesprice and sales date.
I would like to have a list of customer ID, Company name,total sales last year(sum of salesprice for 2013), Total sales till date(Jan 2014 til now). All should include customers details who have not made any sale as well.
Please help me get the right query.
Thanks