como obtengo la cantidad de registros que se repiten por mes, tengo la columna FEC_CREACION y la columna ID_REGISTRO
FEC_CREACION | ID_REGISTRO |
---|---|
2021-12-01 10:45:07.248 | A |
2021-12-22 11:52:59.199 | B |
2021-10-20 11:53:43.464 | A |
2021-09-19 12:12:02.225 | C |
2021-12-11 12:13:05.928 | B |
2021-11-12 12:14:36.850 | A |
2021-09-12 12:15:31.975 | C |
2021-08-11 12:16:35.787 | B |
2021-01-18 12:52:35.207 | B |
2021-02-17 12:55:23.784 | C |
Resultado esperado
MES | A | B | C |
---|---|---|---|
1 | 0 | 1 | 0 |
2 | 0 | 0 | 1 |
3 | 0 | 0 | 0 |
4 | 0 | 0 | 0 |
5 | 0 | 0 | 0 |
6 | 0 | 0 | 0 |
7 | 0 | 0 | 0 |
8 | 0 | 1 | 0 |
9 | 0 | 0 | 2 |
10 | 0 | 0 | 0 |
11 | 1 | 0 | 0 |
12 | 1 | 2 | 0 |