@ChrisNZ
I'm curious about this approach. I got the error below. Trying to fix it but if you already know why i got this error, please let me know.
369 proc sql; 370 select STOCK 371 , min(OPEN) as MIN 372 , pctl(25,OPEN) as P25 373 , pctl(50,OPEN) as P50 374 , pctl(75,OPEN) as P75 375 , max(OPEN) as MAX 376 , sum(calculated MIN <= OPEN < calculated P25) as C1 377 , sum(calculated P25 <= OPEN < calculated P50) as C2 378 , sum(calculated P50 <= OPEN < calculated P75) as C3 379 , sum(calculated P75 <= OPEN <=calculated MAX) as C4 380 FROM sashelp.stocks 381 group by STOCK; ERROR: Summary functions nested in this way are not supported. ERROR: Summary functions nested in this way are not supported. 382 QUIT; NOTE: The SAS System stopped processing this step because of errors. NOTE: PROCEDURE SQL used (Total process time): real time 0.00 seconds cpu time
... View more