我要检查同一个客户的合同在同一个时间段内是否有重复的。表结构是这样的怎么写这个sql?
select * from table where enddate > (select begindate from 表 where id = xxx) and startdate < (select enddate from 表 where id = xxx)