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
what is operational data and operational system? : Sas-di
How sas treats the dsd delimiters?
Explain the use of proc print and proc contents?
What is the order of application for output data set options, input data set options and SAS statements?
In SAS explain which statement does not perform automatic conversions in comparisons?
Name some categories in sas 9? : sas-grid-administration
describe how to adjust the performance of data integrator? : Sas-di
Explain proc sort?
Mention what is the difference between nodupkey and nodup options?
How do you convert basic cube to transaction cube and transaction cube to basic cube?
What is the command used to find missing values?
how does sas handle missing values in procs? : Sas programming
What is the good sas programming practices for processing large data sets?
What will calendar procedure do?
what are the categories that sas informats are used to the place the data? : Sas-administrator