Ver Mensaje Individual
  #3 (permalink)  
Antiguo 24/05/2017, 16:13
Avatar de huesos52
huesos52
Colaborador
 
Fecha de Ingreso: febrero-2009
Ubicación: Manizales - Colombia
Mensajes: 5.980
Antigüedad: 15 años, 3 meses
Puntos: 360
Respuesta: tomar registro mas reciente

Código SQL:
Ver original
  1. SELECT lectura,MAX(consecutivo) FROM lecturas WHERE id=90008038 GROUP BY lectura;

PRuebalo si.

Solo agrupando por lectura.
__________________
Without data, You are another person with an opinion.
W. Edwads Deming