SELECT DATE(c.date_register) AS DATECAST, COUNT(c.id) AS customers
FROM customer c
GROUP BY DATE(c.date_register)
it gives me the number of new customers per date.
Now i want a chart, where i have on the left a selection of years, and in the graph the sum of the customers.
I managed to do this, but only i have 1 problem:
For example: when i select the years 2013 and 2014 in a list, i want the graph to start with the sum of customers until 2013, and then add the sum of customers for the years i selected (2013 and 2014), per year.