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 / a.k.naidu
Having clause can be used only with 'group by'. Difference between 'where' and 'having' is that former works on variable level and latter works on observation level. 'having' works like second where condition on "grouped data"
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
How do dates work in sas?
Explain what is data step?
how does sas handle missing values in functions? : Sas programming
What is a macro routine?
Mention the validation tools used in SAS?
what type of graphs we will create(for 2+years candidates)?
What is the basic structure of a sas program?
Mention what is PROC in SAS?
Differentiate between format and informat? : sas-grid-administration
What is the maximum and minimum length of macro variable
what is the difference between floor and ceil functions in sas? : Sas-administrator
What do you code to create a macro? : sas-macro
Explain proc sort?
how many types of prompts are there? : Sas-bi
What is the purpose of _character_ and _numeric_?