表1如何計算百分比
Date id salary
01/2012 001 1500
01/2011 001 750
01/2010 001 500
從表1,我想打一個百分比爲datewise
預計輸出
Date id salary percentage
01/2012 001 1500 100%
01/2011 001 750 50%
01/2010 001 500 0%
條件
01/2010 salary is 500, then 01/2011 salary is 750, so 50 percentage increased from 01/2010 salary
01/2011 salary is 750, then 01/2012 salary is 1500, so 100 percentage increase from 02/2011 salary
如何製作一個查詢計算百分比。
需要查詢幫助
不能與SQL Server 2000 – 2012-03-05 12:13:01