【发布时间】:2020-07-14 12:51:09
【问题描述】:
我想在新的第三列中重用计算列的值。 例如,此查询有效:
select
countif(cond1) as A,
countif(cond2) as B,
countif(cond1)/countif(cond2) as prct_pass
From
Where
Group By
但是当我尝试使用 A,B 而不是重复计数时,它不起作用,因为 A 和 B 是 invalid:
select
countif(cond1) as A,
countif(cond2) as B,
A/B as prct_pass
From
Where
Group By
我能否以某种方式使第二个版本更具可读性? 这第一个效率低吗?
【问题讨论】:
标签: google-bigquery firebase-analytics