Tengo una tabla (llamada load_zone_prom) con 3 columnas: fecha, zona_carga, valor.
Si hago un select ( SELECT distinct fecha, zona_carga, AVG(truncate(pml_mda,2)) as valor FROM npa.load_zone_prom where zona_carga='ACAPULCO' and fecha between '2020-01-01' and '2020-12-31' group by fecha)
para que sea un solo año, devuelve algo asi:
+-----------------+-----------------+-----------+
| fecha | zona_carga | valor |
+-----------------+-----------------+-----------+
| 2020-01-01 | Acapulco | 13 |
+-----------------+-----------------+-----------+
| 2020-02-01 | Acapulco | 15 |
+-----------------+-----------------+-----------+
| 2020-03-01 | Acapulco | 14 |
+-----------------+-----------------+-----------+
| 2020-04-01 | Acapulco | 13 |
+-----------------+-----------------+-----------+
| 2020-05-01 | Acapulco | 10 |
+-----------------+-----------------+-----------+
| 2020-06-01 | Acapulco | 10 |
+-----------------+-----------------+-----------+
| 2020-07-01 | Acapulco | 10 |
+-----------------+-----------------+-----------+
| 2020-08-01 | Acapulco | 14 |
+-----------------+-----------------+-----------+
| 2020-09-01 | Acapulco | 15 |
+-----------------+-----------------+-----------+
| 2020-10-01 | Acapulco | 16 |
+-----------------+-----------------+-----------+
| 2020-11-01 | Acapulco | 19 |
+-----------------+-----------------+-----------+
| 2020-12-01 | Acapulco | 20 |
+-----------------+-----------------+-----------+
¿Cómo consulto la base de datos para devolver algo como esto?