change of SQl structure for group table