0
私は、以下のデータをSQL Server 2008のテーブルがあります。どのように日の合計を見つけるのですか?
organization , number of request, date number of request
organization1, ID1139151, 2017-03-15 13:10:01.000
organization1, ID1139152, 2017-03-15 14:31:05.000
organization2, ID1139153, 2017-03-16 10:38:08.000
organization2, ID1139154, 2017-03-16 09:26:04.000
organization2, ID1139155, 2017-03-16 18:09:15.000
organization2, ID1139156, 2017-03-16 20:14:29.000
organization3, ID1139157, 2017-03-23 11:18:18.000
は、SQLクエリの助けを借りて、すべての組織によって日のSUMMを見つけるために私を助けて。
結果:
organization , date number of request
organization1, 2
organization2, 4
organization3, 1
ありがとうございます!私は何かが欠けていない限り
CREATE TABLE Mytable (
[organization] varchar(50) NOT NULL,
[number of request] varchar(15) NOT NULL,
[date_number_of_request] datetime NOT NULL,
)
INSERT INTO Mytable
VALUES
('organization1','ID1139151','2017-03-15 13:10:01.000'),
('organization1','ID1139152','2017-03-15 14:31:05.000'),
('organization2','ID1139153','2017-03-16 10:38:08.000'),
('organization2','ID1139154','2017-03-16 09:26:04.000'),
('organization2','ID1139155','2017-03-16 18:09:15.000'),
('organization2','ID1139156','2017-03-16 20:14:29.000'),
('organization3','ID1139157','2017-03-23 11:18:18.000');