I have the data of customers from March 2019 till February 2020. I am counting the total email which was used to purchase our ticket followed by each month and the query I used is

```
  SELECT sub.monthNameYear,sub.monthName,count(*) from
 (SELECT DATE_FORMAT(`reservation_for`,'%Y-%m') as monthNameYear,DATE_FORMAT(`reservation_for`,'%M %Y') as monthName,
         email,
         COUNT(*) AS 'Count'
  FROM `tablename`
  GROUP BY email, DATE_FORMAT(`reservation_for`, '%Y-%m') 
           HAVING COUNT(*) > 1 
  ORDER BY DATE_FORMAT(`reservation_for`, '%Y-%m') ) as sub
GROUP BY sub.monthNameYear;

```

The result that I want is attached below. Where it always selects the beginning of the date and then selects each month then only counts the total email.

[![EXPECTED RESULT](https://i.stack.imgur.com/nX3fM.png)](https://i.stack.imgur.com/nX3fM.png)