Hola grupo, necesito ayuda con una SQL que no consigo hacer:
Tengo lo siguiente:
select TBLAlbaranesDetalles.id_articulo, TBLAlbaranes.fechaAlbaran,
TBLAlbaranes.nombreCliente
from TBLAlbaranesDetalles INNER JOIN TBLAlbaranes
ON TBLAlbaranesDetalles.id_albaran=TBLAlbaranes.id_albaran
where TBLAlbaranesDetalles.id_articulo IN
('0','0201095J','02050124','02050130')
order by TBLAlbaranes.fechaAlbaran DESC
Esto me podría devolver algo asi como:
0 2008-05-12 00:00:00 PEPE GOMEZ
0 2008-04-09 00:00:00 PEDRO GARCIA
0 2008-04-07 00:00:00 PEDRO GARCIA
02050130 2008-04-02 00:00:00 RAMON LOPEZ
02050130 2008-03-13 00:00:00 JOSE LUIS SANZ
Lo que necesito es que la SQL me devuelva solamente la fila más reciente, o
sea:
0 2008-05-12 00:00:00 PEPE GOMEZ
02050130 2008-04-02 00:00:00 RAMON LOPEZ
¿Alguien me puede ayudar?
Leer las respuestas