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 the basic syntax style in SAS?
Explain the purpose of retain statement.
Assuming {et} is randomly drawn from N(0,1) and e0 = 0, generate 200 observations of xt = et − 0.5e(t−1) and draw a line graph of xt.
For clinical entire study how many tables will create approx?
how can you import .csv file in to sas? : Sas programming
what does the run statement do? : Sas programming
How do you convert basic cube to transaction cube and transaction cube to basic cube?
Name and describe few sas character functions that are used for data cleaning in brief.
What are all the problems you faced while validating tables and reports?
What are types of transport files?
Given an unsorted data set, how to read the last observation to a new data set?
how to generate the test data in sas without input data? : Sas-administrator
name several ways to achieve efficiency in your program? : Sas programming
What is the difference between input and infile statement?
Which function is used to count the number of intervals between two sas dates?