When trying to use a postgres function I got stuck using a double for loop in one statement. Underneath is my wip code. What I am trying to achieve:
Select all unique