Y
Yossy
I have a table with multiple columns. But I want to select data from column 1
and Column 4 using date(column 5) as criteria.
My dates are listed daily, how do I sum up the activities of each day into
weeks and have just 4 weekly summed up data. E.g If I want to retrieve for
the month of November...
E.g Column 1 Column 2 Column 3 Column 4 Column 5 (Date)
1. 20 100 90 10 11/1/2008
2. 9 200 108 89 11/2/2008
3. 30 80 69 107 11/3/2008
e.t.c
From sample above I only want weekly data, so for 11/7/2008 I want Column 1
and column 4 summed up for the week. This way my monthly result will be
column 1 column 4 column 5(Date)
290 650 11/7/2008 - This should sum up date
11/1 to 11/7
450 370 11/15/2008 - This should sum up date
11/8 to 11/15
275 610 11/23/2008- This should sum up date
11/16 to 11/23
80 170 11/30/2008- This should sum up date
11/24 to 11/30
Thanks, all help totally appreciated. My query need to be run in MSSql.
and Column 4 using date(column 5) as criteria.
My dates are listed daily, how do I sum up the activities of each day into
weeks and have just 4 weekly summed up data. E.g If I want to retrieve for
the month of November...
E.g Column 1 Column 2 Column 3 Column 4 Column 5 (Date)
1. 20 100 90 10 11/1/2008
2. 9 200 108 89 11/2/2008
3. 30 80 69 107 11/3/2008
e.t.c
From sample above I only want weekly data, so for 11/7/2008 I want Column 1
and column 4 summed up for the week. This way my monthly result will be
column 1 column 4 column 5(Date)
290 650 11/7/2008 - This should sum up date
11/1 to 11/7
450 370 11/15/2008 - This should sum up date
11/8 to 11/15
275 610 11/23/2008- This should sum up date
11/16 to 11/23
80 170 11/30/2008- This should sum up date
11/24 to 11/30
Thanks, all help totally appreciated. My query need to be run in MSSql.