removed group by clause and added select distinct instead

removed group by clause and added select distinct instead