We know we can write a function like
select avg val by category from tab
But what if I need to write a complicated customized functions like
select myfunc by category from tab
where here myfund will compute with multiple columns in the tab. for example inside myfunc I might do another layer of select by, might do some filtering, etc. As a basic example how do I wrap below of a+b+c+d
select a+b+c+d by category from tab
inside a myfunc, where it has visibility into columns a, b, c, and d, and will do some manipulation with them?