BookmarkSubscribeRSS Feed
Naveen1111
Calcite | Level 5

Hi All,

 

Could someone tell me how can I further deduplicate it (as per my knowledge full join combines the result of both left and right outer join) Also, please help me with the sequence/order of SQL syntax as I tried to execute the below program, but it didn't work . Need to know where should I terminate each statement and in which order, should I use order by syntax first or group by or where condition?

 

proc sql; create table ph as select* from sashelp.class where age>14 order by weight desc group by sex; quit;

3 REPLIES 3
Jagadishkatam
Amethyst | Level 16

The below paper should help you with all details

https://support.sas.com/resources/papers/proceedings/proceedings/sugi29/268-29.pdf 

Thanks,
Jag
PGStats
Opal | Level 21

The clauses of a simple SQL query should be ordered like this:

 

proc sql;
create table ph as 
select * 
from sashelp.class 
where age > 14 
group by sex
having weight > mean(weight)
order by weight desc;
quit;
PG