BookmarkSubscribeRSS Feed
nenè
Calcite | Level 5

 

Hi.

i have to write SQL procedure using dataset 'Inizial_data' to calcolate total vehicle cost (TOT_VEH-COST) BY ASSETTYPE for vehicles not older than 10.What will be my output?

 

Can we help me?

 

thank you

 

 

3 REPLIES 3
Kurt_Bremser
Super User

In proc sql, use a where condition for the "vehicles not older than 10" part. Use a group by clause for the "by assettype" part. Use the sum() function for summarizing.

 

Study the documentation for PROC SQL.

RW9
Diamond | Level 26 RW9
Diamond | Level 26

Is this a college question or something?  It sounds like you should be working this out.  Have a go and come back with specific questions.  There are numerous examples in the documentation or on w3schools:
https://www.w3schools.com/sql/

Which can get you going, its a very simple problem.

ChrisBrooks
Ammonite | Level 13

Looking at the question you posted on a different sub-forum https://communities.sas.com/t5/SAS-Studio/DEBUGGING-OPTIONS-IN-SAS/m-p/387260 it appears that these questions are for a university exam. I don't wish to sound patronising but these are fairly simple SAS questions and if we just give you the answers it might help you pass an exam but you won't actually learn very much in the process.

 

My advice would be:

 

1. Read the extensive documentation on the SAS Web Site; and

2. Try to answer the question yourself (with code where applicable); and

3. Use google to see if the question has been asked before; and

4. If you're still stuck post the question on here showing us what you've tried.

 

Everyone on here is super-helpful but we want to help you in a way that will actually teach you something and not undermine the purpose of your course.

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 1061 views
  • 4 likes
  • 4 in conversation