I have tried to Use specification to to retrieve the data with various predicates everything works fine but I have sorting on some columns but I also want to use distinct to avo