Oracle has multiple records with the same ID in a table, and each ID only gets the latest record

select c.open_id,c.created_date
                           from (select t.*,
                                        row_number() over(partition by t.open_id order by t.created_date desc) rn
                                   from nec_opr.EC_WECHAT_CALL_DATA_BIND t
                                  where t.open_id is not null) c
                          where rn = 1;

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326444406&siteId=291194637