Print — Summarize

Expression summarize

The target field can be a dictionary or in-line expression. To our example we will add an in-line expression of the average shipment amount:

QUIZ-114

  • [ avg(amount) where amount > 0 ]
    • avg(amount)avg is a special reserved word that will compute the average
    • where — like the main where clause, this introduces the conditions for the field
    • amount > 0 — the condition is that the shipment amount is greater than zero.
    • [ and ] — brackets define the in-line expression.

The last column is now the average Sale for each customer:

QUIZ-115

   Page 1 — summarize
   Page 2 — summarize syntax
   Page 3 — numeric summarize
   Page 4 — date summarize
   Page 5 — expression summarize
   Page 6 — text summarize

Next – text summarize >