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.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Can some body help me - Query writing

Author  Topic 

sponguru_dba
Yak Posting Veteran

93 Posts

Posted - 2006-01-12 : 02:47:23
Hi all

Here my data format

ONE TWO THREE
---------------------
1 20 100
1 30 102
1 32 100
2 43 103
2 40 104
2 22 100
3 21 null
3 50 null
|
|
|
.
.
.
200

from above based on column ONE iwant agreegation of TWO column

in above table
1 -- 82
2 -- 105
3 -- 71
:
:
:
100 -- something

Advanced Tahnks
Sree

ditch
Master Smack Fu Yak Hacker

1466 Posts

Posted - 2006-01-12 : 02:50:55
SELECT ONE, SUM(TWO) GROUP BY ONE

Duane.
"It's a thankless job, but I've got a lot of Karma to burn off."
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-01-12 : 03:10:41
Learn basics of SQL
http://www.sql-tutorial.net/
http://www.firstsql.com/tutor.htm
http://www.w3schools.com/sql/default.asp


Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

sponguru_dba
Yak Posting Veteran

93 Posts

Posted - 2006-01-12 : 03:33:48
Thaking You
ditch and madhivanan for help
Go to Top of Page
   

- Advertisement -