MySQL Forums
Forum List  »  Spanish

Último valor
Posted by: Xavi Tena Carbonell
Date: June 05, 2015 12:32PM

Buenas tardes.

Tengo una tabla con campos repetidos y valores distintos. Tengo un campo timestamp y me gustaria una consulta que me devuelva el último valor de cada campo distinto.

Nombre Valor Timestamp
A 1 9
A 2 8
B 5 7
C 7 6
A 4 5
B 4 4
C 77 3
C 3 2
B 7 1
C 3 0

Quiero que me devuelva:

Nombre Valor
A 1
B 5
C 7

Como puedo hacerlo? Muchas gracias!

Options: ReplyQuote


Subject
Views
Written By
Posted
Último valor
1698
June 05, 2015 12:32PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.