How do I return more than one column when using SELECT DISTINCT, without the extra columns being included in the 'DISTINCT' part?
eg.
SELECT DISTINCT col1, col2, col3 FROM table
Checks col2 and col3 are distinct too, whereas I just want distinct col1's!
I'm using MS SQL Server.
eg.
SELECT DISTINCT col1, col2, col3 FROM table
Checks col2 and col3 are distinct too, whereas I just want distinct col1's!
I'm using MS SQL Server.