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 |
|
hasanali00
Posting Yak Master
207 Posts |
Posted - 2005-03-11 : 10:28:42
|
| HiI have thought long and ard about this select query, bit i just cannot think how to do it:I have follwoing data:Year Ponits11 312 111 112 2I want to run a query that will produce follwoing:Year points11 412 3Basically, for every Year, i want to count the points.Any ideas?? thanks |
|
|
mr_mist
Grunnio
1870 Posts |
Posted - 2005-03-11 : 10:32:55
|
| SELECT year, sum(points) as [points] from yourtable group by year-------Moo. :) |
 |
|
|
hasanali00
Posting Yak Master
207 Posts |
Posted - 2005-03-11 : 10:54:16
|
| can't thank u enough |
 |
|
|
Hippi
Yak Posting Veteran
63 Posts |
Posted - 2005-03-11 : 16:23:27
|
| You should read BOL first, man. It's a very basic T-SQL. |
 |
|
|
|
|
|