A query like the one below will give me the correct result. However, needless to say it will be terribly slow.
SELECT SUM(Dist) FROM A WHERE
A.NodeId >
(SELECT MAX(CInner.NodeId) From C AS CInner WHERE CInner.ObsId = COuter.ObsId AND CInner.NodeId < COuter.NodeId) AND
A.NodeId <=...
Hi,
You may. :-) Sorry for beeing so illusive. I am working in the transportation business. The purpose is to diagnose and repair a database containing information collected from our veichles.
Or at least I find it tricky. :-)
Assume we have three tables A, B and C. Table A contains a path and the distance for traveling that path:
A (PathId, NodeId, Dist (from previous node))
1, 1, 0
1, 2, 10
1, 3, 5
Table B contains observed data on path level:
B (ObsId, PathId)
1, 1
2, 1
Table...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.