Sort by SEX and NAME in descending order with the NODUPLICATES option.
collist=makelist();
rc=insertc(collist, 'sex', -1);
rc=insertc(collist, 'DESCENDING', -1);
rc=insertc(collist, 'name', -1);
call send(tabid, '_sort', collist, '/noduplicates');
rc=dellist(collist);