Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

2
  • 2
    Calculate ROW_NUMBER() OVER (PARTITION BY id, addr, ind ORDER BY update_date DESC) in CTE and select only records where the calculated value is 1. Commented Oct 12, 2018 at 5:34
  • I think your description is not clear. Do you want the following: Divide the rows of a table into groups. A group should consist of all rows that have the same ID, ADDR and update_Date. From each group select an arbitrary row whose update_Date is equal to the maximal update_Date of its group. Commented May 5, 2020 at 5:09