The query works if the select columns only from the table A. Unfortunately, I have some columns from the A1. What I try to do is to eliminate duplicate returned result (in terms of same ID) with a bias to one code value.
It works. I only provide an example data of the code. Say the code 'en' is the one I preferred, but it is not necessary the smallest one in any given list of codes. Any further enhacnement possibility?