- 論壇徽章:
- 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
現(xiàn)在我想按照前面的comcode1 去計(jì)算starcount /endcount 并將結(jié)果返回
自己寫的是
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
但是發(fā)現(xiàn)這樣算出的結(jié)果存在問題,請(qǐng)路過的前輩幫忙指正一下哪里有問題,謝謝了
|
|