I think this is a simple question to solve, but I will investigate for an hour to answer. I have a table with three columns: "id", "id_x" and "name". But it is filled with duplicate values, for example:
id id_x name
1 100 Name_aaa
2 100 Name_aaa
3 100 Name_aaa
4 100 Name_aaa*
5 101 Name_bbb
6 101 Name_bbb*
Ok, ok, I did not create this table, and I can’t change them ... I just want to know what query I can execute to return only the values "100 - Name_aaa" and "101 - name_bbb", ... note that after some names there is a "*". I would like to group only "id_x".
Is there a way to do this without using subqueries or joins?
Thanks in advance!
source
share