select distinct 会员卡号,会员名称 from 销售流水表
where (会员卡号 in (select 会员卡号 from 销售流水表 where substring(流水字段,1,2)='09'))
and (会员卡号 in (select 会员卡号 from 销售流水表 where substring(流水字段,1,2)='10'))
select distinct * from 销售流水表
where(
(会员卡号 in(select 会员卡号 from 销售流水表 where 流水帐号 is like "09%")
=
(会员卡号 in(select 会员卡号 from 销售流水表 where 流水帐号 is like "10%")
)
select distinct 会员卡号,会员名称 from 销售流水表
where 会员卡号 in(select 会员卡号 from 销售流水表 where 流水帐号 like '09%')
and 会员卡号 in(select 会员卡号 from 销售流水表 where 流水帐号 like '10%')