我想在桌子上的每一天的select
总和在和之间p_amount
Payments
p_date
@startdate
@enddate
CREATE TABLE [dbo].[tbl_Payments](
[p_id] [bigint] IDENTITY(100000,1) NOT NULL,
[p_amount] [int] NOT NULL,
[p_status] [tinyint] NOT NULL,
[p_date] [datetime] NOT NULL,
[p_creditor] [int] NOT NULL,
[p_debtor] [int] NOT NULL,
[p_type] [int] NOT NULL,
CONSTRAINT [PK_tbl_Payments] PRIMARY KEY CLUSTERED )
我想像关注
sum day
---------------------------------
30 2013-07-01
40 2013-07-02
... ....
10 2013-07-19