[英]calculate the percentage with sql and DOMO
I have a table where I want to calculate the percentage of revenue using the following formula: (Advertiser Revenue / Total Revenue) * 100. Data =>我有一个表格,我想使用以下公式计算收入百分比:(广告商收入/总收入)* 100。数据 =>
Partner Date Ad Unit Revenue Total Revenue
App 1/1/2020 x 10 13
App 1/1/202 y 3 13
Here is my code and what I have tried:这是我的代码和我尝试过的:
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
Error: syntax error: execute command denied to user错误:语法错误:拒绝用户执行命令
In Domo, this calculation would best be done at the visualization layer using Beast Mode.在 Domo 中,这种计算最好使用 Beast Mode 在可视化层完成。 Just create your beast mode that is Revenue
/ Total Revenue
.只需创建您的野兽模式,即Revenue
/ Total Revenue
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.