The following example forms a collection of yachts and uses the
SUM statement to summarize the prices of yachts in the collection
and to display the number of yachts built by each builder. Edit
strings are used to format the values:
DTR> READY YACHTS; FIND FIRST 6 YACHTS
[6 records found]
DTR> SUM 1 ("NUMBER"/"OF YACHTS") USING 9,
CON> PRICE USING $$$$,$$$ BY BUILDER
NUMBER NUMBER
MANUFACTURER OF YACHTS PRICE OF YACHTS PRICE
ALBERG 1 $36,951
ALBIN 3 $64,000
AMERICAN 2 $28,790
6 $129,741
DTR>