Removed select star and group by

Removed select* and group by and instead added the column names and select distinct