并集用and连接就行了
(性别 = '男' and 年月 in ('201801','201802','201803')) and (性别 = '女' and 年月 in ('201301','201302','201303'))
甜大大,這個不行吧?有結果豈非人妖?