in reply to Sliding window intervals and average values for specific coordinates
The solution that first popped into my head involved the use of an SQL JOIN to take advantage of the one-to-many relationship between markers and windows. Coding off the top of my head, something like:
SELECT m.coordinate, AVERAGE(i.quantitativeValue) FROM markers m INNER JOIN intervals i ON (m.coordinate >= i.lowCoordinate) AND (m.coordinate <= i.highCoordinate) GROUP BY m.coordinate
Looking over the SQL I’ve just written, I wonder if this is, indeed, the solution to your problem. The more I look at it, the more that I think that it is. This will equally accommodate there being just one intervals row for each marker, or more than one.