I need to create a query that will count the number of dependents that are listed under an employee. Currently, the table will list the employee's SSN in one column and either their own SSN in the second column (if they have no dependents) or their dependent's SSN. I'm looking for a way that, in a subsequent column of the table, I can calculate how many dependent's the employee has. Any ideas on this?
Below is a table example and where I'd want the count to be.
Member SSN Dep SSN Count
123456789 123456789 3