In a table structured as follows:
family integer not null, - PRIMARY KEY
message integer not null,
parent integer not null
This structure behaves like a linked list, each message created has
a parent of the last message created within the family.
So, the question is:
given message 103 what message has zero parent within the same
family message parent
1 100 0 (first message for family has zero
1 101 100
1 102 101
1 103 102
The SQL cannot use family as this is not indexed and the parents or
messages are not necessarily in any order.
Any replies would be appreciated!
(I seem to remember Pat McGibbon asking something similar to this a
while back if I'm not mistaken.