Ver Mensaje Individual
  #4 (permalink)  
Antiguo 06/03/2011, 05:55
reivaj01
 
Fecha de Ingreso: abril-2008
Mensajes: 93
Antigüedad: 16 años
Puntos: 10
Respuesta: Seleccionar solo la hora mayor y menor

SELECT t1.NUsuario, MIN(t1.Hora), MAX(t1.Hora) FROM horario t1 inner join usuarios t2 on t1.NUsuario = t2.NUsuario and t1.Fecha = '".$jueves."' inner join trabajadores t3 on t1.NTrabajador = t3.NTrabajador WHERE t2.NUsuario = '".$NUsuario."' GROUP BY t1.NUsuario