...
Rule:
Trainee has only one current programme membership ending more than in the time-period window of interest (from 12 months before form submission date , starting less than to 4 months after form submission), with matching local office and programme details. SQL.
...