How about (min1 >= min2) and (max1 <= max2)?
(Assuming min1, max1 = 4, 10and min2, max2 = 3, 20)
Note. You want to compare endpoints without actually making / not evaluating ranges, otherwise it will be terribly inefficient.
edit: This also works; not better but prettier imo:min2 <= min1 <= max1 <= max2
source
share