Syntax, SELECT statement:
PROC SQL <options>;
SELECT column-1 <,...column-n>
FROM input-table
<WHERE clause>
<GROUP
BY clause>
<HAVING clause>
<ORDER
BY clause>
;
QUIT;
|
proc sql;
select empid, jobcode, salary, salary*.06 as bonus
from certadv.payrollmaster
where salary<32000
order by jobcode;
quit;
proc sql;
select *
from certadv.staffchanges;
quit;
proc sql feedback; select * from certadv.staffchanges; quit;
NOTE: Statement transforms to: select STAFFCHANGES.EmpID, STAFFCHANGES.LastName, STAFFCHANGES.FirstName, STAFFCHANGES.City, STAFFCHANGES.State, STAFFCHANGES.PhoneNumber from CERTADV.STAFFCHANGES;
proc sql;
select empid, jobcode, salary, salary*.06 as bonus
from certadv.payrollmaster
where salary<32000
order by jobcode;
quit;
proc sql;
select distinct flightnumber, destination
from certadv.internationalflights;
quit;