Can we use where and having clauses in a single SAS program.
ex: proc sql;
select a,b,c from test
where state in 'KA'
and having <some condition>.
Is the above program run correctly, if not why ?
Answer Posted / rauthu
Yes, WHERE and HAVING can be used in single program. HAVING must be after GROUP by clause.
Example:
proc sql;
select make, model, avg(msrp) as avgmsrp, msrp
from sashelp.cars
where make ='Honda'
group by model
having avgmsrp < 100000;
quit;
| Is This Answer Correct ? | 9 Yes | 1 No |
Post New Answer View All Answers
Differentiate between proc means and proc summary.
What is the difference between INPUT and INFILE ?
What are the data types does SAS contain?
Intern stastical programmer written test
What is run-group processing?
Explain the difference between using drop = data set option in set and data statement?
If you were told to create many records from one record, show how you would do this using array and with proc transpose?
How would you define the end of a macro? : sas-macro
Hi,by usining ptf how we have to combine (likr merge)10 datasets at a time in the oracle database(and write a macro code also)?Like this i have a douts a lot if you dont mind may please send one text mail for me(madhusudhanap16@gmail.com)?
What function CATX syntax does?
what is proc Index? and what is proc document?
Explain translate function?
What are the default statistics for means procedure?
hi tell be about pfizer? how to compare the work with other companies ? please tell me how to login and work also?
List out some key concept of SAS