Sum (query directive)

From WandoraWiki
Revision as of 13:11, 25 August 2009 by Olli (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Description

Returns the sum of values of active column.

Constructor

Sum(Directive directive)

Examples

Following example sums the number of instances of each instances.

importPackage(org.wandora.query2);
new Sum(
  new Count(new Instances())
  .from(new Instances())
)

Note that you can do the same thing easier without the Sum.

importPackage(org.wandora.query2);
new Count(new Instances().from(new Instances()))
Personal tools