implemented group by
added group by clause
added group by clause