Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
roy mm
Yak Posting Veteran
62 Posts |
Posted - 2007-07-22 : 06:57:55
|
Hello.I have a query That look like that:"SELECT COUNT(*),MONTH FROM TABLE GROUP BY MONTH"The result is:Jun 2Feb 2Mar 3Apr 0May 5What I want to have is that every month will sum up the previous month and him self so in the end I will be able the create a graph wuth those numbers:Jun 2Feb 4Mar 7Apr 7May 13Any ideas on how to start? |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-07-22 : 09:02:58
|
1) Do it in front-end!2) Your resultset does not match your query.3) How do you want your data to be sorted?Peter LarssonHelsingborg, Sweden |
 |
|
roy mm
Yak Posting Veteran
62 Posts |
Posted - 2007-07-22 : 09:07:52
|
I found a great query in another forum:SQL> select b.sal,sum(a.sal) as cum_sal2 from emp a,emp b3 where a.rowid <= b.rowid4 group by b.rowid,b.sal5 /Thanks. |
 |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-07-22 : 09:45:19
|
Where is the RowID column in your original post?Peter LarssonHelsingborg, Sweden |
 |
|
|
|
|