I have a sales chart that records the date and time of the sale.
The output format is this: "2018-09-02 15:00:08"
I wanted to get total sales per month but I'm having a hard time putting the query together. How can I filter only the month from a more complex data such as what I have?
The result should look something like this : January sales - 10 sales February - 5 sales
Table structure:
id | data_hora | total_pagamento