CodePudding user response:
select *
The from (select t1. *,
Row_number () over (partition by t1. User_id order by t2. User_change_date desc) rn
The from t1, t2
Where a t1. User_id=t2. User_id) t1
Where a t1. Rn=1;
CodePudding user response:
select *
The from (select t1. *,
Row_number () over (partition by t1. User_id order by t2. User_change_date desc) rn
The from t1, t2
Where a t1. User_id=t2. User_id) t1
Where a t1. Rn=1;