Talk:Fun with PROC SQL Summary Functions
From sasCommunity
Kirk wrote: "Without the availability of summary functions, you would have to construct the necessary logic using somewhat complicated SQL programming constructs." However, I have a hard time seeing any way to aggregate in PROC SQL without using the functions. In other words, I think the functions are an absolute necessity, not just a convenience. Can anybody show a workaround for the (hypothetical) unavailability of the summary functions?--Howles 11:12, 26 April 2007 (EDT)
[edit] Deriving statistics without functions
I haven't time to try to make it work, but I suspect that reading a table and deriving Monotonic would give me a record number, the last of which I could send to a macro symbol as the count.
Similarly, using an order by I could sort my data and select the highest value into a macro symbol. Rereading that table with an InObs = 1 should also let me derive the minimum value.
Having said that; a small mistake on my part is likely to be costly and I am glad that functions exist to derive statistics, functions that have been extensively tested and validated.
