List of Twins et al

Quote from Tom Holden on 2024-08-21, 9:04 pmThis query was prompted by this post by ttri in the Community Forum that responded to a Topic started by @kevync a couple of months earlier. After debugging ttri's script (it wasn't enclosed in code tags and got corrupted), on running it gave me bogus results because of individuals having alternate Birth events on the same date. That got me to thinking how to get only twins and I came up with a very different strategy that returns only the 17 genuine pairings out of the 83 initially. My query does not check for witnesses of the birth event as does ttri's but that can easily be added.
Sample results:
RIN1 Given1 Surname Given2 RIN2 Born 92 Orrilla Fitchett Rosetta 93 D.+18391224..+00000000.. 163 Florence Orilla Annis Louise Wilma 169 D.+18920000..+00000000.. 184 Victor Holden Royal 185 D.+18990524..+00000000.. The script is attached.
This query was prompted by this post by ttri in the Community Forum that responded to a Topic started by @kevync a couple of months earlier. After debugging ttri's script (it wasn't enclosed in code tags and got corrupted), on running it gave me bogus results because of individuals having alternate Birth events on the same date. That got me to thinking how to get only twins and I came up with a very different strategy that returns only the 17 genuine pairings out of the 83 initially. My query does not check for witnesses of the birth event as does ttri's but that can easily be added.
Sample results:
RIN1 | Given1 | Surname | Given2 | RIN2 | Born |
---|---|---|---|---|---|
92 | Orrilla | Fitchett | Rosetta | 93 | D.+18391224..+00000000.. |
163 | Florence Orilla | Annis | Louise Wilma | 169 | D.+18920000..+00000000.. |
184 | Victor | Holden | Royal | 185 | D.+18990524..+00000000.. |
The script is attached.
Uploaded files:
Quote from kevync on 2024-08-21, 9:24 pmQuite cool and thank you for thinking of me! ( had 98 rows)
I will add that to my SQL Create qry group to work as know I only tagged about 20 of those probably.
Quite cool and thank you for thinking of me! ( had 98 rows)
I will add that to my SQL Create qry group to work as know I only tagged about 20 of those probably.

Quote from thejerrybryan on 2024-08-21, 10:22 pmVery elegant.
RM needs to add the capability of running these kinds of queries in behalf of its users.
Very elegant.
RM needs to add the capability of running these kinds of queries in behalf of its users.

Quote from ttri on 2024-08-22, 9:08 amTom: Nice code. In my database, I have an event type of "Alt Birth" so didn't think about checking for the multiple "birth" events.
I've attached my modified code to exclude those records that have a shared birth event, which in the case of my database means that I've already defined the twin relationship. This allows me to run the script and identify those twins that I need to fix.
Tom: Nice code. In my database, I have an event type of "Alt Birth" so didn't think about checking for the multiple "birth" events.
I've attached my modified code to exclude those records that have a shared birth event, which in the case of my database means that I've already defined the twin relationship. This allows me to run the script and identify those twins that I need to fix.
Uploaded files:
Quote from Tom Holden on 2024-08-22, 12:57 pmThanks @ttri. Your original query did identify the issue that my test database does have same-dated Birth events for an individual for quite a few people which would warrant attention for cleanup in a production database if there is no good reason to keep them, such as evidence pointing to two different Birth places.
I may have to retract or modify my statement that it would be easy to take into account witnesses of the Birth event. Your revision of my script removes twins when one of them is a witness to any event. To be precise, it would have to filter out only if a twin has a witness role of "twin" to another person's Birth event. That's a bit more complicated and because the RoleID for the "twin" role varies with database, it has to be looked up in the RoleTable. Then there's the consideration of triplets, quadruplets, ... So it's not so easy...
Thanks @ttri. Your original query did identify the issue that my test database does have same-dated Birth events for an individual for quite a few people which would warrant attention for cleanup in a production database if there is no good reason to keep them, such as evidence pointing to two different Birth places.
I may have to retract or modify my statement that it would be easy to take into account witnesses of the Birth event. Your revision of my script removes twins when one of them is a witness to any event. To be precise, it would have to filter out only if a twin has a witness role of "twin" to another person's Birth event. That's a bit more complicated and because the RoleID for the "twin" role varies with database, it has to be looked up in the RoleTable. Then there's the consideration of triplets, quadruplets, ... So it's not so easy...

Quote from ttri on 2024-08-22, 4:11 pmYou're exactly right that the "twin" role would likely be different in each user's database. I think that this is one of those situations where the query has to be adjusted for how the user is using database. But your script does at least identify those children with same birth date and same parents. From there it's up to the user.
BTW, Thanks for maintaining your site for all us RM users!
You're exactly right that the "twin" role would likely be different in each user's database. I think that this is one of those situations where the query has to be adjusted for how the user is using database. But your script does at least identify those children with same birth date and same parents. From there it's up to the user.
BTW, Thanks for maintaining your site for all us RM users!

Quote from kevync on 2024-08-22, 7:30 pmRM needs to add the capability of running these kinds of queries in behalf of its users. (JerryByan)
agreed -- Not sure how many user have Work with Family Historian -- it had some powerful query language -- though somewhat had to learn all it potential.
At least with RM10 -- it was a huge leap. ( I was not with RM prior to ver 7). Imagine long time users really appreciated it . My need for SQL was greatly reduced - but there are many things "has source" but NOT "has media" would be nice.
RM needs to add the capability of running these kinds of queries in behalf of its users. (JerryByan)
agreed -- Not sure how many user have Work with Family Historian -- it had some powerful query language -- though somewhat had to learn all it potential.
At least with RM10 -- it was a huge leap. ( I was not with RM prior to ver 7). Imagine long time users really appreciated it . My need for SQL was greatly reduced - but there are many things "has source" but NOT "has media" would be nice.