Hi Sachin,
I tried execute your query with the below inputs it seems you picked the max value for particular Alt_id_type.
Here for 1234, i have just changed C_id instead of D_id and it seems getting 1 row for the coresponding id, but as per my understanding it could have been come with 2 rows.
Acct_num Acct_type Alt_id Alt_id_type
1234 A 12 C_id
1234 A 34 C_id
2345 B 23 D_id
2345 B 45 E_id
Please have look and correct if I am wrong!
Regards,
Mohan K
↧