星际2maru比赛视频:数据库查询
来源:百度文库 编辑:高考问答 时间:2024/04/29 07:31:10
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