How to select only the first rows for each unique value of a column
- by nuit9
Let's say I have a table of customer addresses:
CName | AddressLine
-------------------------------
John Smith | 123 Nowheresville
Jane Doe | 456 Evergreen Terrace
John Smith | 999 Somewhereelse
Joe Bloggs | 1 Second Ave
In the table, one customer like John Smith can have multiple addresses.
I need the select…