Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What is auto call macro and how to create a auto call macro? What is the use of it? How to use it in sas with macros? : sas-macro

1038


What is the SAS data set?

1129


what are _numeric_ and _character_ and what do they do? : Sas programming

1155


How long can a macro variable be? A token? : sas-macro

1214


what is the basic structure sas administrator? : Sas-administrator

1005


How can I remove header from output data set?

2621


Mention what is SAS data set?

1132


What is the good sas programming practices for processing large data sets?

1113


What do the SAS log messages "numeric values have been converted to character" mean?

1380


explain the main difference between the nodup and nodupkey options? : Sas-administrator

1162


What are the different operating system platforms in which we can use sas? : sas-grid-administration

1072


what is data integration? : Sas-di

1118


How would you include common or reuse to be processed along with your statements?

2371


How are numeric and character missing values represented internally?

1659


what is the difference between: x=a+b+c+d; and x=sum (of a, b, c ,d);? : Sas programming

1142