with T1 As (Select * From Table1)Select * From T1 where sex=1 Union All Select * From T1 where type=2