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

Differentiate between proc means and proc summary.

998


What is the difference between INPUT and INFILE ?

1240


What are the data types does SAS contain?

1052


Intern stastical programmer written test

679


What is run-group processing?

1090


Explain the difference between using drop = data set option in set and data statement?

1102


If you were told to create many records from one record, show how you would do this using array and with proc transpose?

1415


How would you define the end of a macro? : sas-macro

1034


Hi,by usining ptf how we have to combine (likr merge)10 datasets at a time in the oracle database(and write a macro code also)?Like this i have a douts a lot if you dont mind may please send one text mail for me(madhusudhanap16@gmail.com)?

1627


What function CATX syntax does?

1165


what is proc Index? and what is proc document?

2630


Explain translate function?

1128


What are the default statistics for means procedure?

1168


hi tell be about pfizer? how to compare the work with other companies ? please tell me how to login and work also?

2035


List out some key concept of SAS

1043