- 论坛徽章:
- 0
|
本帖最后由 Newbee_Mofi 于 2017-11-17 13:00 编辑
表temp_starcount
comcode1 starcount
371122 408
371195 27
371192 129
371102 133
371193 86
371121 192
371199 406
371190 63
371196 114
表temp_endcount
comcode1 endcount
371122 763
371196 172
371192 223
371102 243
371193 130
371121 313
371190 96
371199 787
371195 59
现在我想按照前面的comcode1 去计算starcount /endcount 并将结果返回
自己写的是
select a.comcode1,endcount,starcount,
(round(starcount/endcount*100,2)||'%') as xbl
from temp_endcount a,temp_starcount b
group by 1,2,3
into temp tmp_hz with no log
但是发现这样算出的结果存在问题,请路过的前辈帮忙指正一下哪里有问题,谢谢了
|
|