I need all columns in a table but two columns must be distinct. I used this code but It check all columns, but I only need two of them will be distinct. How can I satisfy this?
select distinct a.personalId, a.fileId, a.name, a.surname, a.address from my_table a
If I used the following code, I can not get the other columns:
select distinct a.personalId, a.fileId from my_table a