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 the function of catx syntax? : Sas-administrator

1081


how can you put a "trace" in your program? : Sas programming

1039


if the Id has more then two transcatiion then show the first observation, IF Id has only two observation then It show both the observation

1604


what is slowly changing dimension? : Sas-di

1109


Describe the ways in which you can create a macro variable?

1067


How would you identify a macro variable? : sas-macro

1002


Describe a time when you were really stuck on a problem and how you solved it?

2616


List down the reasons for choosing sas over other data analytics tools.

1258


describe the interaction table in sas di? : Sas-di

1018


Explain data step in SAS

1062


Mention what is the difference between nodupkey and nodup options?

1000


Describe the function and untility of the most difficult SAS macro that you have written.

2082


What is your favorite all time computer book? Why?

2493


what is snowflake schema? : Sas-di

1205


What do the PUT and INPUT functions do?

1316