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
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.
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.
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.
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!
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.