Didn't look at you db - it's too early yet (for me) because of the lack of understanding what this process and design is about. If the tables are related, then why does one seem to have a PK field (ID) and the other does not contain those PK values as a foreign key? That will make this infinitely harder. By your post, I can't even tell which table might be the parent/one side and which contains the related records/many side - or even if they're supposed to be related. Perhaps this is a one time fix?
If 1.13.1.13 is the parent, then IT should have the unique value of (e.g.) 26 and every 1.13.1.13.x in the other table should have an fk value of 26, then you'd just find the max of the trailing number where the fk matches the pk value of 26. Without that relation, you have a difficult problem IMO.
The more we hear silence, the more we begin to think about our value in this universe.
Paraphrase of Professor Brian Cox.