我正在将 SAP 的 Hybris 用于一个小项目,并且几乎成功了。我正在尝试使用灵活搜索查找过去 7 天内订单数量为 0 的服务点位置。
这是我使用的 HAC 脚本:
select count(*), {PointOfService.name} from {Order left join PointOfService on {Order.pointOfService} = {PointOfService.pk}} where {creationTime} >= '2019-10-01' GROUP by {PointOfService.name} order by count(*)
该脚本为我提供了每个单独的 PointOfService 的订单数量,但没有给我带有“0”订单的 PointOfService 位置。我读到这是由于 count(*) 没有提供 NULL 值。有谁知道解决这个问题的方法?