Sql Server Select Rows By Distinct Column

[Solved] Sql Server Select Rows By Distinct Column | Perl - Code Explorer | yomemimo.com
Question : sql server select rows by distinct column

Answered by : jared

SELECT a.*
FROM emails a
INNER JOIN (SELECT email, MIN(id) as id FROM emails GROUP BY email
) AS b ON a.email = b.email AND a.id = b.id;

Source : https://stackoverflow.com/questions/8273987/select-unique-rows-based-on-single-distinct-column | Last Update : Thu, 19 Mar 20

Answers related to sql server select rows by distinct column

Code Explorer Popular Question For Perl