New SAS User

Completely new to SAS or trying something new with SAS? Post here for help getting started.
BookmarkSubscribeRSS Feed
11427qvolaf
Calcite | Level 5

The dataset Contacts is comprised of several entries for each subject (unique identifier is patient_number).  You are asked to create a new dataset containing one row per patient with the number of contacts per month.  What sample SAS or SQL code would be used to complete this request.

3 REPLIES 3
japelin
Rhodochrosite | Level 12

Is it possible to provide actual data or sample data that reflects the actual situation?

ballardw
Super User

@11427qvolaf wrote:

The dataset Contacts is comprised of several entries for each subject (unique identifier is patient_number).  You are asked to create a new dataset containing one row per patient with the number of contacts per month.  What sample SAS or SQL code would be used to complete this request.


Look at documentation for Procs Means, Summary, Freq, Report, Tabulate and SQL. All of these can create such a summary. The preferred choice might come with additional requirements.

 

Or tasks to COUNT.

sas-innovate-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

Register now!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 858 views
  • 0 likes
  • 4 in conversation