4
Good day I need to bring only one product per affiliate, but in my table I have several times the same product just changing the date, I would like to take the product of the last date.
What do I have:
SELECT ID, CODFIL, DT, COLUNAVARIANTE FROM X;
Upshot:
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
You need this: #Select first record within a segmentation in SQL Server See function: #Sqlfiddle
– Marconi
Take a look at my answer!
– Marconi
Excellent @Marconi !!
– Gabriel Souza
Excellent!! Thank you very much!
– Gabriel Souza
of nothing, gives a read on the question that Linkei about. I have an answer there that has 3 ways to do this!
– Marconi