I have a table with a lot of entries pear month from different years, I need to group them by month so after that I could count the entries and make the sum, but I should do it without group the years. The results should be like this:
| year | month | entriesPerMonth | sumPerMonth |
|:.....|:......|:..................|:..............|
|2021 | 1 | ... | ... |
|2021 | 2 | ... | ... |
|2021 | 3 | ... | ... |
|2021 | 4 | ... | ... |
|2021 | 5 | ... | ... |
|2021 | 6 | ... | ... |
|2021 | 7 | ... | ... |
|2021 | 8 | ... | ... |
|2021 | 9 | ... | ... |
|2021 | 10 | ... | ... |
|2021 | 11 | ... | ... |
|2021 | 12 | ... | ... |
|2020 | 1 | ... | ... |
|2020 | 2 | ... | ... |
|2020 | 3 | ... | ... |
|2020 | 4 | ... | ... |
|2020 | 5 | ... | ... |
|2020 | 6 | ... | ... |
... ... ... ...
|2019 | 1 | ... | ... |
|2019 | 2 | ... | ... |
|2019 | 3 | ... | ... |
|2019 | 4 | ... | ... |
// and so on ...
The thing is that I don't know how to "say" in the query: "Only group month if the year are the same", or something like that. Thanks to anyone ho take the time.