22,206
社区成员
发帖
与我相关
我的任务
分享
select * from ProductAttributeValue where id in
(
select id from
(
select distcint ID from ProductAttributeValue where attributeValueID = 1
union all
select distcint ID from ProductAttributeValue where attributeValueID = 2
union all
select distcint ID from ProductAttributeValue where attributeValueID = 3
) t group by id having count(1) = 3
)
select * from ProductAttributeValue where id in
(
select id from
(
select distcint ID from ProductAttributeValue where attributeValueID = 1
union all
select distcint ID from ProductAttributeValue where attributeValueID = 100
union all
select distcint ID from ProductAttributeValue where attributeValueID = 200
) t group by id having count(1) = 3
)