Sentry Page Protection
Programming Tips 2
Please note that the clauses in the SQL procedure must be listed in this specific order:
- SELECT clause
- FROM clause
- WHERE clause
- GROUP By clause
- HAVING clause
- 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;
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.