【发布时间】:2019-10-09 22:57:25
【问题描述】:
我正在将 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 值。有谁知道解决这个问题的方法吗?
【问题讨论】: