Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Filter on highest ID based on a date field.

I have a table with some values

 

DateProduct_IDCustomerOrd_ID
01.02.2019 00:00:00 3050-1001

1

01.02.2019 00:00:00 3050-1001

1

01.02.2019 00:00:00 3050-1001

2

01.02.2019 00:00:00 3050-1001

2

 

I need something that returns the highest Ord_ID vaules only based on the same date and time, so I get this output.

 

01.02.2019 00:00:00 3050-1001

2

01.02.2019 00:00:00 3050-1001

2

 

Is there a way to accomplish this? My table has about 1.000.000 rows and sometimes duplicates occurs, but allways on the same date. 

 

Suggestions? 🙂 Please help me.

1 Reply