Search the site...

SASCRUNCH TRAINING
  • Home
  • Member's Area
  • How to Start
  • SAS Interface
  • Creating a Data Set
  • Practical SAS Training Course
  • SAS Certified Specialist Training Program
  • Proc SQL Course
  • Introduction to Time Series Analysis
  • SAS Project Training Course
  • Full Training / Membership
  • Sign up
  • About us
  • Contact us
  • Home
  • Member's Area
  • How to Start
  • SAS Interface
  • Creating a Data Set
  • Practical SAS Training Course
  • SAS Certified Specialist Training Program
  • Proc SQL Course
  • Introduction to Time Series Analysis
  • SAS Project Training Course
  • Full Training / Membership
  • Sign up
  • About us
  • Contact us
Sentry Page Protection
Please Wait...
Picture
Programming Tips 2


Please note that the clauses in the SQL procedure must be listed in this specific order:
  1. SELECT clause
  2. FROM clause
  3. WHERE clause
  4. GROUP By clause
  5. HAVING clause
  6. ORDER By clause

Example
​Proc sql;
select make, mean(msrp) as mean
from sashelp.cars
where type = "Sedan"
group by make
having mean >40000
order by mean desc;
quit;

The GROUP BY and HAVING clauses will be explained in the next few sessions.
Okay. got it!
Already a member? Go to member's area.