so basically you have this? DEED_NR START_SHARE END_SHARE 1 1 50 2 1 25 3 1 75 If you need get them out the result should be 1 - 150. If that´s the case you could use the SUM function:
Select sum(END_SHARE) from DEEDS
if your START_SHARE = END_SHARE+1 (1-49, 50-74, 75-154 eg) of the previous record you just need to select that last record of the deed containing the shares.
Select END_SHARE from DEEDS HAVING DEED_NR = max(DEED_NR) --(not sure if a having works without a group by, but there are other constructs doing similar things.)
hope this gives you an idea.
V.
(MQOTD rules and previous solutions)