BookmarkSubscribeRSS Feed
kristinekene
Calcite | Level 5

Activity 7.02 *;
* 1) Complete the SQL query to display Event and Cost *;
* from PG1.STORM_DAMAGE. Format the values of Cost. *;
* 2) Add a new column named Season that extracts the *;
* year from Date. *;
* 3) Add a WHERE clause to return rows where Cost is *;
* greater than 25 billion. *;
* 4) Add an ORDER BY clause to arrange rows by *;
* descending Cost. Which storm had the highest *;
* cost?

 

Can someone assist ? How do I format the value of Cost to Billions ?

Thank you

5 REPLIES 5
Reeza
Super User
What do you mean by format the cost to Billions?
$3,000,000,000 or $3B?
kristinekene
Calcite | Level 5

It doesnt specify. 3B?

Reeza
Super User
Have you learned to create custom formats in your course or do you think they'd want you to use an available format? What have you learned about formats so far?
kristinekene
Calcite | Level 5

I think that they would want us to use available formats.

Reeza
Super User
Then they probably want just a dollar format:

format yourVariable $dollar32.;

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

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
  • 5 replies
  • 1465 views
  • 0 likes
  • 2 in conversation