08-11-2017 04:55 AM
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?
08-11-2017 05:18 AM - edited 08-11-2017 05:19 AM
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.
08-11-2017 05:31 AM
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:
Which can get you going, its a very simple problem.
08-11-2017 11:09 AM
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.