Here is my PEOPLE table where I store name, surname, DOB (date of birth) and some other data. In a new query I need to add additional column with the condition for people with the same Name & Surname combination. Here is the condition:

* Go through each group of people with the same Name & Surname combinations, in additional field mark those, whose DOB is not maximum and not minimum (compared only to same Name & Surname)
* If there is only 1 or 2 occurrences of same Name & Surname, mark them anyway

[![enter image description here](https://i.stack.imgur.com/Siwj1.jpg)](https://i.stack.imgur.com/Siwj1.jpg)

Here is the result of a query

[![enter image description here](https://i.stack.imgur.com/lNRI2.jpg)](https://i.stack.imgur.com/lNRI2.jpg)

Explanation:

* John Doe marked as met only once
* Tom Taylor marked as met only twice
* Alice Smith and Bob Brown marked everywhere except records with min and max DOB

**Please help to form SQL query for the desired output.** Here is my understanding (guessing)

* Get list of unique Name&Surname pairs, ( where occurrences >2 ??? )
* For each unique pair find rows with min and max DOB (avoid them)
* In a new CheckBox column mark those that are left (not extremum)