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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sums and Groups 1

Status
Not open for further replies.

DonaZ

Technical User
Oct 10, 2007
41
US
I have the following fields:

ID
Level
Invites
Attends
NoShows
Region
City

I want totals of invites, attends, no shows by region and by city.

I am having problems.

This worked and returned the correct total:

proc sql;
create table DR2008TEST as
select level, sum(invites) as invites, sum(attends) as attends,sum(NoShows) as NoShows
from Test1
group by level
;
quit;

I have problems when I begin to group for region and city.

Any Suggestions. Thank you in advance for your time.

DonaZ
 
What problems do you have?
Code:
proc sql;
create table DR2008TEST as
  select region
        ,sum(invites) as invites
        ,sum(attends) as attends
        ,sum(NoShows) as NoShows
  from Test1
  group by region
;
quit;
... should work just fine.

Chris
Business Analyst, Code Monkey, Data Wrangler.
SAS Guru.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top