Table1: https://i.stack.imgur.com/XVyYf.png
Table2: https://i.stack.imgur.com/762uM.png
expect the result: https://i.stack.imgur.com/lNssy.png
if have many data in array[R80,R01,R02,R03,R04,R05...] and 'Table2', so i want in array to find the 'Table2' data the result must 'date' is new(DESC)/limit 1
example:
like select * from tabel2 where ID = 'R80' DESC Date Limit1
But i want to get all items [R80,R01,R02,R03,R04,R05...]
like select * from tabel2 where in [R80,R01,R02,R03,R04,R05...] DESC Date Limit1??
Please help~Thx
not use "loop,declare,@" is best
Please dont answer
select * from tabel2 where ID = 'R80'...;
select * from tabel2 where ID = 'R01'...;
select * from tabel2 where ID = 'R02'...;
...