使用 sql 和 DOMO 计算百分比

calculate the percentage with sql and DOMO

我有一个 table,我想在其中使用以下公式计算收入百分比:(广告商收入 / 总收入)* 100。 数据 =>

Partner    Date           Ad Unit   Revenue   Total Revenue
App        1/1/2020       x         10        13
App        1/1/202        y         3         13

这是我的代码和我尝试过的代码:

SELECT ad.`Partner`,
       ad.`Date`,
       ad.`Ad Unit`,
       ad.`Revenue`,
       ad.`Total Revenue`
      (ad.`Revenue` / ad.`Total Revenue`) * 100 as `Percentage`
FROM `ad_unit_totals` as ad

错误:语法错误:拒绝用户执行命令

在Domo中,这个计算最好在可视化层使用野兽模式来完成。只需创建 Revenue / Total Revenue.

的野兽模式