|
|
![]() |
|
Additional Features |
![]() |
|
|
To further refine a PROC SQL query that contains a GROUP BY clause, you can use a HAVING clause. A HAVING clause works with the GROUP BY clause to restrict the groups that are displayed in the output, based on one or more specified conditions. For example, the following PROC SQL query groups the output rows by
|
proc sql;
select jobcode,avg(salary) as Avg
from sasuser.payrollmaster
group by jobcode
having avg(salary)>40000
order by jobcode;
|
| You can learn more about the use of the HAVING clause in the lesson . |
| Copyright
© 2003 SAS Institute Inc.,
Cary, NC, USA. All rights reserved. Terms of Use & Legal Information | Privacy Statement |
||