Constraint in select_one yes_no with age and sex

Check this one might be this will helpful for you.

Above is just how can you use constraints.
Best,
@iamnarendrasingh