i am beginner in sql, Display the latest value (eg mobile no)from the active record of customers
below is the Source for one customer if i have many, how to get the latest value, we need to ignore the "D" record and select the 2nd record.
Custno inserttype mobileno effdt
123 D 899999 2020-01-01
123 I 898797 2019-10-10
123 U 546789 2019-03-24
123 I 744444 2018-01-01
345 U 616161 2020-01-01
345 I 666666 2018-01-01
output
Custno inserttype mobileno effdt
123 I 898797 2019-10-10
345 U 616161 2020-01-01
please help me with query