removed group by primary key clause