rincewind44
Programmer
Hi,
I'm working off the following table
-------------------------------------------------
Key ID TeamName Points Rebounds
1 16 NCI 22 2
2 17 Knights 32 3
3 18 NCI 44 4
4 19 Knights 7 5
5 20 NCI 12 6
6 21 Knights 26 7
7 22 NCI 33 8
8 23 Knights 5 9
9 16 NCI 50 2
10 17 Knights 40 3
11 18 NCI 30 4
12 19 Knights 20 5
13 20 NCI 25 6
14 21 Knights 35 7
15 22 NCI 10 8
16 23 Knights 10 9
--------------------------------------------------------
I want to write an sql statement that will add up the total points and rebounds for each ID i.e. ID 16 would be 72 points and 4 rebounds.
I've tried using count and sum statements but they don't seem to work.
I'm fairly new to this so can any point me in the right direction?
Thanks
I'm working off the following table
-------------------------------------------------
Key ID TeamName Points Rebounds
1 16 NCI 22 2
2 17 Knights 32 3
3 18 NCI 44 4
4 19 Knights 7 5
5 20 NCI 12 6
6 21 Knights 26 7
7 22 NCI 33 8
8 23 Knights 5 9
9 16 NCI 50 2
10 17 Knights 40 3
11 18 NCI 30 4
12 19 Knights 20 5
13 20 NCI 25 6
14 21 Knights 35 7
15 22 NCI 10 8
16 23 Knights 10 9
--------------------------------------------------------
I want to write an sql statement that will add up the total points and rebounds for each ID i.e. ID 16 would be 72 points and 4 rebounds.
I've tried using count and sum statements but they don't seem to work.
I'm fairly new to this so can any point me in the right direction?
Thanks