Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.

ProjectionNode Class

Add aggregate functions to the query, or define an alias.

Namespace

wave

Usage

Refer to the QueryBuilder example.

ProjectionNode Methods

The following are methods for ProjectionNode.

sum()

Returns the sum of a numeric field.

Signature

public wave.ProjectionNode sum()

Return Value

Type: wave.ProjectionNode

avg()

Returns the average value of a numeric field.

Signature

public wave.ProjectionNode avg()

Return Value

Type: wave.ProjectionNode

min()

Returns the minimum value of a field.

Signature

public wave.ProjectionNode min()

Return Value

Type: wave.ProjectionNode

max()

Returns the maximum value of a field.

Signature

public wave.ProjectionNode max()

Return Value

Type: wave.ProjectionNode

count()

Returns the number of rows that match the query criteria.

Signature

public wave.ProjectionNode count()

Return Value

Type: wave.ProjectionNode

unique()

Returns the count of unique values.

Signature

public wave.ProjectionNode unique()

Return Value

Type: wave.ProjectionNode

alias(name)

Define output column names.

Signature

public wave.ProjectionNode alias(String name)

Parameters

  • name:

    Type: String

    The name to use for this column. For example, this code defines the alias c:
    1Wave.ProjectionNode[] projs = new Wave.ProjectionNode[]{Wave.QueryBuilder.count().alias('c')};

Return Value

Type: wave.ProjectionNode