maxIntersectionsPosition
Aggregate function that calculates the positions of the occurrences of the maxIntersections function.
The syntax is:
Arguments
-
start_column– the numeric column that represents the start of each interval. Ifstart_columnisNULLor 0 then the interval will be skipped. -
end_column- the numeric column that represents the end of each interval. Ifend_columnisNULLor 0 then the interval will be skipped.
Returned value
Returns the start positions of the maximum number of intersected intervals.
Example
The intervals look like the following:
Notice that three of these intervals have the value 4 in common, and that starts with the 2nd interval:
Response:
In other words, the (1,6) row is the start of the 3 intervals that intersect, and 3 is the maximum number of intervals that intersect.