We have a table which records relationships between siblings – tbl_relationships (fig1 of attached)
The reverse of each relationship is listed so each relationship appears twice. Eg. John > Paul, and Paul > John
I need a column that generates the unique id of the family (as per fig2 of attached).
Is this possible? Any help to develop this sql is appreciated.