creating view-group, fixing sql crash