数我有这样的查询:怎么不来一轮SQL
Select Customer,JobType,sum(SThours),
sum(OThours),SortMonth,
str((sum(OThours)/sum(SThours)),5,2)AS Ratios
from #data
group by Customer,JobType,SortMonth
Sum (SThours): 688
sum(OThours): 618
的比例应该是688分之618= 0.90,但我的结果是1.00
我是新来的SQL,我需要帮助。谢谢。
您正在使用的数据库? – beny23 2013-02-21 13:58:37
非常感谢,我得到它 – 2013-02-21 14:26:32