I have been asked one question like :
Which one is better to avoide the duplicate of data for the following scenario ?
table name : tbl_erpsale
select distinct SaleDate from tbl_erpsale
select SaleDate from tbl_erpsale group by SaleDate
In my above scenario, which one is best. My seniors saying like "group by" is better than the "distinct". But, they don't know the exact reason. But they using this way only
could anybody explain me the reason ? please ?