Why is SQL Select Distinct giving duplicate rows? How to fix an SQL Distinct which is returning duplicate rows.