I have a table like
id type note
1 A ab cd
1 B cdef
1 A abd
1 A abcd
I want to get all the unique notes after removing space so my result will be like this
id type note
1 A ab cd
1 A abd
1 B cdef
because after removing space ab cd and abcd will be same. I am using Postgres. Please note that id column in not unique.