SELECT timecontrollings.id,
       areas.id as area,
       areas.nombre as nombreArea,
       usuarios.id as usuario,
       usuarios.nombre as nombreUsuario,
       usuarios.horas as horasUsuario,
       ROUND(SUM(timecontrollings.horas),2) as horas,
       MONTH(timecontrollings.fecha) as mes,
       YEAR(timecontrollings.fecha) as year,
       timecontrollings.createdAt,
       timecontrollings.updatedAt
FROM   timecontrollings, areas, usuarios
WHERE  timecontrollings.usuario = usuarios.id AND
        usuarios.area = areas.id
GROUP BY areas.id,usuarios.id, MONTH(timecontrollings.fecha), YEAR(timecontrollings.fecha)
