sql查出时间段包含几个区间段
and ( (begin_date <='2020-08-01' and end_date >='2020-12-09') or (begin_date >='2020-08-03' and end_date <='2020-12-09') or (begin_date >='2020-08-03' and end_date >='2020-12-09') or (begin_date <='2020-08-03' and end_date>='2020-08-03' and end_date <='2020-12-09') )
sql分4中情况,分别包含就行
查询表数据如下: