ProjectionNode Class

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

wave

Refer to the QueryBuilder example.

The following are methods for ProjectionNode.

  • sum()

    Returns the sum of a numeric field.

  • avg()

    Returns the average value of a numeric field.

  • min()

    Returns the minimum value of a field.

  • max()

    Returns the maximum value of a field.

  • count()

    Returns the number of rows that match the query criteria.

  • unique()

    Returns the count of unique values.

  • alias(name)

    Define output column names.

Returns the sum of a numeric field.

public wave.ProjectionNode sum()

Type: wave.ProjectionNode

Returns the average value of a numeric field.

public wave.ProjectionNode avg()

Type: wave.ProjectionNode

Returns the minimum value of a field.

public wave.ProjectionNode min()

Type: wave.ProjectionNode

Returns the maximum value of a field.

public wave.ProjectionNode max()

Type: wave.ProjectionNode

Returns the number of rows that match the query criteria.

public wave.ProjectionNode count()

Type: wave.ProjectionNode

Returns the count of unique values.

public wave.ProjectionNode unique()

Type: wave.ProjectionNode

Define output column names.

public wave.ProjectionNode alias(String name)

  • name:

    Type: String

    The name to use for this column. For example, this code defines the alias c:

Type: wave.ProjectionNode