Sum (query directive)

From WandoraWiki
(Difference between revisions)
Jump to: navigation, search
 

Latest revision as of 13:11, 25 August 2009

[edit] Description

Returns the sum of values of active column.

[edit] Constructor

Sum(Directive directive)

[edit] 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