

El query usado fue:
Query q = sesion.createSQLQuery("select p.nombre, p.apellido, sum(m.saldo), monthname(m.fecha), year(m.fecha) from persona p, presupuesto pr, movimiento m where p.id_persona=pr.fk_id_persona and pr.id_presupuesto=m.fk_id_presupuesto and monthname(m.fecha)=monthname(pr.fecha_inicial) and year(m.fecha)=year(pr.fecha_inicial) and p.id_persona="+idpersona+" group by monthname(m.fecha), year(m.fecha);");
No hay comentarios:
Publicar un comentario