Table composite view working with sorting