Removed select star and group by

Removed select* and group by and instead added the column names and select distinct
we need to split this query
to allow the query work when you click on order by title