Forum OpenACS Q&A: Any idea with support sql-like language in tcl list ?

Hi,
I have some reporting requirement that need to support
function such as group/sum/avg/max/min in tcl list. I know I can insert my dataset into Oracle database, then perform sql statement to fetch new dataset. My condition is the data source are some csv file that may have 10,000 rows, and I want to create a subset (maybe 100 rows) with a grouping function. Insert into DB and fetch data is a solution. But this may take too long for end user. Do there have any package that I can perform grouping function in tcl list ?
Hi,

Did you try list builder to do what you want?

Look at template::list api documentation in your install or

https://openacs.org/api-doc/proc-view?proc=template%3a%3alist%3a%3aelement%3a%3acreate

listbuilder has available properties as "aggregate". As api-browser says:

"Aggregate function to use on this column. Can be 'sum', 'average', or 'count'. The aggregate will be displayed at the bottom of the table. If groupby is used, aggregates for each group will also be displayed."

I already used this template system feature to produce aggregates for exporting as cvs format (also suported as property by listbuilder)

Hope it help you.

/Orzenil