pivot_where 函数
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
pivot_where
函数可用于表计算,以按条件选择数据透视表列。
语法
pivot_where(select_expression, expression)
pivot_where
函数会返回满足 select_expression
或 null
且唯一的汇总列的 expression
值(如果不存在这样的列或不唯一,则返回 null)。
示例
在以下示例中,我们查找基于“订单状态”且值为“待处理”的汇总列。如果找到,则返回该单元格中的“Order Count”(订单数量):
pivot_where(${orders.status} = "pending", ${orders.count})
须知事项
如果只有 一个数据透视列的 select_expression
为 true,则返回 expression
。否则,expression
会返回 NULL。
pivot_where
无法在自定义过滤条件中使用。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-02-04。
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-02-04。"],[],[]]