Ver Mensaje Individual
  #3 (permalink)  
Antiguo 11/06/2008, 22:55
Avatar de manyametal
manyametal
 
Fecha de Ingreso: enero-2008
Mensajes: 36
Antigüedad: 16 años, 3 meses
Puntos: 0
Respuesta: ayuda para consultas

1- select soldados.* from soldados as S, licencia as L where S.DniMilitar = L.DniMilitar and DateDiff("d", fechaFin, fechaInicio) > 15;

2- select * from Cuartel as C, Compania as D where C.CodCuartel = D.CodCuartel group by D.CodCuartel having count(*)>4;

3-select * from cuartel as C, almacena as A where C.CodCuartel = A.CodCuartel group by CodCuartel having sum(A.monto)> 500.000;

probalo, no se si estara bien,, si alguno corrige