SELECT timecontrollings.id,
       timecontrollings.usuario,
       timecontrollings.centroCostoSap,
       centro_costos_sap.nombre as nombreCentroCostoSap,
       centro_costos_sap.codigo,
       ROUND(SUM(timecontrollings.horas),2) as horas,
       centro_costos_sap.color,
       MONTH(timecontrollings.fecha) as mes,
       YEAR(timecontrollings.fecha) as year,
       timecontrollings.createdAt,
       timecontrollings.updatedAt
FROM timecontrollings,
     centro_costos_sap
WHERE timecontrollings.centroCostoSap = centro_costos_sap.id
GROUP BY  usuario,
          centroCostoSap,
          MONTH(timecontrollings.fecha),
          YEAR(timecontrollings.fecha)
