Added Group By clause for views