NOTE: The entire second parameter is a string and must be enclosed in quotes. Also, note that the vertical bar (|) means "or" in this usage. For instance, use either ASC or DESC, but not both.
sum_column
alias
ASC
DESC
NOTE: For each of the following keywords, the value is a string in the format'col1 [alias], [col2 [alias],] ... [coln [alias]]', which represents a list of column names from in_table and associated aliases for result.
Count
Max
Min
Sum
INFO, prop_trx PROP_TRX STRUCT = -TABLE_3745584016934985140252399 Array(10000) INFO, prop_trx, /Structure ** Structure TABLE_3745584016934985140252399, 8 tags, 72 length: TRX_ID LONG 0 PROP_TYPE STRING 'OTHER ' PROP_ADDRESS STRING '' PROP_POST_CD STRING '' PROP_XGRID DOUBLE 0.0075200000 PROP_YGRID DOUBLE 1.6357100 TRX_AMT DOUBLE 116383.00 TRX_DATE STRUCT -
!DT Array(1)
trx_sum = GROUP_BY( prop_trx, $ 'prop_type my_prop_type ', $ AVG='trx_amt my_avg_amt, ' + $ 'prop_xgrid my_avg_x, ' + $ 'prop_ygrid my_avg_y ', $ SUM='trx_amt my_total_amt', $ COUNT='prop_type my_type_cnt')
INFO, trx_sum TRX_SUM STRUCT = -TABLE_2654125490145392573020051 Array(9)
INFO, trx_sum, /Structure ** Structure TABLE_2654125490145392573020051, 6 tags, 48 length: MY_PROP_TYPE STRING 'STUDIO ' MY_AVG_AMT DOUBLE 54541.422 MY_AVG_X DOUBLE 2.5688594 MY_AVG_Y DOUBLE 1.5601237 MY_TYPE_CNT LONG 1075 MY_TOTAL_AMT DOUBLE 58632029.
trx_sum2 = QUERY_TABLE( prop_trx, $ 'prop_type my_prop_type, ' + $ 'AVG(trx_amt) my_avg_amt, ' + $ 'AVG(prop_xgrid) my_avg_x, ' + $ 'AVG(prop_ygrid) my_avg_y, ' + $ 'SUM(trx_amt) my_total_amt, ' + $ 'COUNT(prop_type) my_type_cnt ' + $ 'GROUP BY prop_type ')
INFO, trx_sum2 TRX_SUM2 STRUCT = -TABLE_7241171353020130317830120 Array(9) INFO, trx_sum2, /Structure ** Structure TABLE_7241171353020130317830120, 6 tags, 48 length: MY_PROP_TYPE STRING 'STUDIO ' MY_AVG_AMT DOUBLE 54541.422 MY_AVG_X DOUBLE 2.5688594 MY_AVG_Y DOUBLE 1.5601237 MY_TYPE_CNT LONG 1075 MY_TOTAL_AMT DOUBLE 58632029.
For more information on BUILD_TABLE, see Chapter 9, Creating and Querying Tables, in the PV-WAVE User's Guide.
For information on reading data into variables, see Chapter 8, Working with Data Files, in the PV-WAVE Programmer's Guide.