Let's say I have a table of customer addresses:
Name | AddressLine
-------------------------------
John Smith | 123 Nowheresville
Jane Doe | 456 Evergreen Terrace
John Smith | 999 Somewhereelse
Joe Bloggs | 1 Second Ave
I would like to return two random rows from this table, but I do not want to return two rows with the same Name (example of what I don't want):
Name | AddressLine
-------------------------------
John Smith | 123 Nowheresville
John Smith | 999 Somewhereelse
How can I do this in Postgres?