如何获取所有PriceRow?在灵活的查询中,同一baseStore中至少有2个价格相同



我需要一个灵活的查询来获取同一基本商店中至少有两个相同价格的所有PriceRowModel。这是可能的,还是我需要一个groovy脚本来选择它们?

对于此查询有效:

SELECT {p.PK} FROM {PriceRow as p JOIN CatalogVersion as cv on {p.catalogversion}={cv.PK} JOIN Catalog as c on {cv.catalog}={c.PK} JOIN CatalogsForBaseStores as rel ON {c.PK}={rel.target} JOIN BaseStore as bs ON {rel.source}={bs.PK}} where {bs.uid}='my_store' AND {p.price} IN ({{SELECT {price} FROM {PriceRow} group by ({price}) having count({price}) > 1}} )

相关内容

  • 没有找到相关文章

最新更新