Good morning I need to bring only one product per branch, however in my table I have several times the same product just changing the date, I would like to get the product from the last date.
What I have:
SELECT ID, CODFIL, DT, COLUNAVARIANTE FROM X;
Result:
ID CODFIL DT COLUNAVARIANTE 1 1 XXXXX X 1 1 YYYYY Y 1 2 XXXXX X 1 3 XXXXX
What I need
ID CODFIL DT COLUNAVARIANTE 1 1 XXXXX X 1 2 XXXXX X 1 3 XXXXX X