找到百分比 [英] find percentage
问题描述
您好,
我的要求如下。
col A           Col b         col c           %col
类别1       1500        3000               
50%
类别2       2000        3000               
66.6%
所以我想计算%col为(col b / col c)* 100
如何在查询级别执行此操作。
sania
从表中选择ColA,ColB,ColC,(colB / ColC * 1.0)* 100
Hi,
I have requirement as below.
col A Col b col c %col
category 1 1500 3000 50%
category 2 2000 3000 66.6%
So I want to calculate %col as (col b/col c)*100
How can I do this at query level.
sania
select ColA,ColB,ColC, (colB/ColC*1.0)*100 from table
这篇关于找到百分比的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!