BookmarkSubscribeRSS Feed
harveysarah0
Calcite | Level 5

Sort your merged SAS data set by price of a quarter rack of ribs, from cheapest to

most expensive. Print the resulting table and present it (properly titled) in your

solutions.

 

proc sort data=Bbq;
          
   by descending price 
  
run;

 

What else am I missing? 

3 REPLIES 3
Patrick
Opal | Level 21

Use a Title statement and Proc Print to print your data.

Check if the sort order is correct and from cheapest (lowest value) to most expensive (highest value).

harveysarah0
Calcite | Level 5

what's a title statement? Sorry I am very new to SAS. and so everything is right except including the title statement and using Proc Print?

Patrick
Opal | Level 21

Proc Sort allows you to sort a table. You've done that (but.... shouldn't you sort ascending from lowest to highest value?).

Now using this sorted table you need to create a report (print what's in the table).

 

The title statement is what allows you to define a title for your report. Documented here.

Proc Print is a SAS procedure which allows you to create a report (print your data). Documented here.

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 375 views
  • 0 likes
  • 2 in conversation