日期:2014-05-17 浏览次数:20559 次
年 2014-1 2014-2 2014-3 2014-4 2014-5 2014-6 2014-7 2014-8 2014-9 2014-10 2014-11 2014-12
30 0 32 32 22 2 0 4 0 0 6 22
2014
----------------------------------------------------------------
-- Author :DBA_Huangzj(發糞塗牆)
-- Date :2014-01-10 15:46:00
-- Version:
-- Microsoft SQL Server 2012 (SP1) - 11.0.3128.0 (X64)
-- Dec 28 2012 20:23:12
-- Copyright (c) Microsoft Corporation
-- Enterprise Edition (64-bit) on Windows NT 6.2 <X64> (Build 9200: )
--
----------------------------------------------------------------
--> 测试数据:[huang]
if object_id('[huang]') is not null drop table [huang]
go
create table [huang]([日期] date,[金额] float)
insert [huang]
select '2014-1-1',10 union all
select '2014-1-1',20 union all
select '2014-3-1',11 union all
select '2014-3-1',21 union all
select '2014-4-1',32 union all
select '2014-5-1',22 union all
select '2014-6-1',2 union all
select '2014-8-1',4 union all
select '2014-11-1',6 union all
select '2014-12-1',22 union all
select '2013-1-1',1