Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sum query 1

Status
Not open for further replies.

gearypa

Programmer
Apr 14, 2003
4
0
0
IE
Hi
I have a table set up in my database called "teams" which stores 'team_name' and 'points_scored'. I want to be able to select 10 teams from the table and sum their points together giving an overall total. For example, I want to get the total points amassed by Arsenal,Liverpool,Manchester United,Newcastle,Celtic,Chelsea,Portsmouth, Watford,Livinston,Southampton. I would be very grateful for any help you could give me

Thanks
Patrick
 
Code:
select sum(points_scored)
from teams
where team_name in 
('Arsenal','Liverpool','Manchester United',
'Newcastle','Celtic','Chelsea','Portsmouth',
'Watford','Livinston','Southampton')
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top