gpt4 book ai didi

java - Hybris 关系型 FlexibleSearch 选择

转载 作者:行者123 更新时间:2023-11-30 07:41:19 26 4
gpt4 key购买 nike

Hybris 为同一个基础商店的用户创建多个购物车。如何选择一个商店有多个购物车的用户?

稍后我会对它们进行排序并删除最旧的。

SELECT {u.code} as userCode,
{c.code} as cartCode,
{c.site} as cartSite
FROM {User as u join Cart as c on {u.pk} = {c.user}}
WHERE...

最佳答案

使用这个:

select {u.pk}, {b.pk}, count(distinct({c.pk})) 
from {
user as u
join cart as c on {c.user} = {u.pk}
join basestore as b on {b.pk} = {c.store}
}
group by {u.pk}, {b.pk}
having count(distinct({c.pk})) > 1

关于java - Hybris 关系型 FlexibleSearch 选择,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56168381/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com