数据库查询
来源:百度知道 编辑:UC知道 时间:2024/05/16 14:05:48
create proc myproc(@date datetime)
declare @max int
declare @min int
declare @count int
select top 1 @max=number from table where [date]=@date order by date desc
select top 1 @min=number from table where [date]=@date order by date
select @count=count(*) from table where [date]=@date
/*显示增长率*/
select ((@max-@min)/@count)/@min * 100