Redivis Documentation
API DocumentationRedivis Home
  • Introduction
  • Redivis for open science
    • FAIR data practices
    • Open access
    • Data repository characteristics
    • Data retention policy
    • Citations
  • Guides
    • Getting started
    • Discover & access data
      • Discover datasets
      • Apply to access restricted data
      • Create a study
    • Analyze data in a workflow
      • Reshape data in transforms
      • Work with data in notebooks
      • Running ML workloads
      • Example workflows
        • Analyzing large tabular data
        • Create an image classification model
        • Fine tuning a Large Language Model (LLM)
        • No-code visualization
        • Continuous enrollment
        • Select first/last encounter
    • Export & publish your work
      • Export to other environments
      • Build your own site with Observable
    • Create & manage datasets
      • Create and populate a dataset
      • Upload tabular data as tables
      • Upload unstructured data as files
      • Cleaning tabular data
    • Administer an organization
      • Configure access systems
      • Grant access to data
      • Generate a report
      • Example tasks
        • Emailing subsets of members
    • Video guides
  • Reference
    • Your account
      • Creating an account
      • Managing logins
      • Single Sign-On (SSO)
      • Workspace
      • Studies
      • Compute credits and billing
    • Datasets
      • Documentation
      • Tables
      • Variables
      • Files
      • Creating & editing datasets
      • Uploading data
        • Tabular data
        • Geospatial data
        • Unstructured data
        • Metadata
        • Data sources
        • Programmatic uploads
      • Version control
      • Sampling
      • Exporting data
        • Download
        • Programmatic
        • Google Data Studio
        • Google Cloud Storage
        • Google BigQuery
        • Embedding tables
    • Workflows
      • Workflow concepts
      • Documentation
      • Data sources
      • Tables
      • Transforms
        • Transform concepts
        • Step: Aggregate
        • Step: Create variables
        • Step: Filter
        • Step: Join
        • Step: Limit
        • Step: Stack
        • Step: Order
        • Step: Pivot
        • Step: Rename
        • Step: Retype
        • Step: SQL query
        • Variable selection
        • Value lists
        • Optimization and errors
        • Variable creation methods
          • Common elements
          • Aggregate
          • Case (if/else)
          • Date
          • DateTime
          • Geography
          • JSON
          • Math
          • Navigation
          • Numbering
          • Other
          • Statistical
          • String
          • Time
      • Notebooks
        • Notebook concepts
        • Compute resources
        • Python notebooks
        • R notebooks
        • Stata notebooks
        • SAS notebooks
        • Using the Jupyter interface
      • Access and privacy
    • Data access
      • Access levels
      • Configuring access
      • Requesting access
      • Approving access
      • Usage rules
      • Data access in workflows
    • Organizations
      • Administrator panel
      • Members
      • Studies
      • Workflows
      • Datasets
      • Permission groups
      • Requirements
      • Reports
      • Logs
      • Billing
      • Settings and branding
        • Account
        • Public profile
        • Membership
        • Export environments
        • Advanced: DOI configuration
        • Advanced: Stata & SAS setup
        • Advanced: Data storage locations
        • Advanced: Data egress configuration
    • Institutions
      • Administrator panel
      • Organizations
      • Members
      • Datasets
      • Reports
      • Settings and branding
    • Quotas and limits
    • Glossary
  • Additional Resources
    • Events and press
    • API documentation
    • Redivis Labs
    • Office hours
    • Contact us
    • More information
      • Product updates
      • Roadmap
      • System status
      • Security
      • Feature requests
      • Report a bug
Powered by GitBook
On this page
  • Any value
  • Average
  • Count
  • Logical and
  • Logical or
  • Max
  • Min
  • String aggregate
  • Sum

Was this helpful?

Export as PDF
  1. Reference
  2. Workflows
  3. Transforms
  4. Variable creation methods

Aggregate

Last updated 1 year ago

Was this helpful?

Any value

Returns any value from the input or NULL if there are zero input rows –>

ANY_VALUE(@variable)

Return type

dynamic (input-dependent)

Parameters

Name
Type
Allowed values
Required
Placeholder (in UI)

@variable

true

-

Average

Returns the average of all non-null values –>

AVG(@variable)

Return type

float

Parameters

Name
Type
Allowed values
Required
Placeholder (in UI)

@variable

true

-

Count

COUNT([@distinct ]@variable)

Return type

integer

Parameters

Name
Type
Allowed values
Required
Placeholder (in UI)

@variable

false

(*)

@distinct

true

-

Logical and

LOGICAL_AND(@variable)

Return type

boolean

Parameters

Name
Type
Allowed values
Required
Placeholder (in UI)

@variable

true

-

Logical or

LOGICAL_OR(@variable)

Return type

boolean

Parameters

Name
Type
Allowed values
Required
Placeholder (in UI)

@variable

true

-

Max

MAX(@variable)

Return type

dynamic (input-dependent)

Parameters

Name
Type
Allowed values
Required
Placeholder (in UI)

@variable

true

-

Min

MIN(@variable)

Return type

dynamic (input-dependent)

Parameters

Name
Type
Allowed values
Required
Placeholder (in UI)

@variable

true

-

String aggregate

STRING_AGG([@distinct ]@variable[, @delimiter][ LIMIT @limit])

Return type

string

Parameters

Name
Type
Allowed values
Required
Placeholder (in UI)

@variable

true

-

@delimiter

false

(",")

@distinct

true

-

@limit

false

-

Sum

SUM(@variable)

Return type

dynamic (input-dependent)

Parameters

Name
Type
Allowed values
Required
Placeholder (in UI)

@variable

true

-

any

any ,

Returns the count of all non-null values –>

any

any

Returns the logical AND of all non-NULL expressions –>

any

Returns the logical OR of all non-NULL expressions –>

any

Returns the maximum value of all non-null inputs –>

any

Returns the minimum value of all non-null inputs –>

any

Returns a string obtained by concatenating all non-null values –>

any

any

any

any

Returns the sum of all values, ignoring nulls –>

any ,

learn more
learn more
learn more
learn more
learn more
learn more
learn more
learn more
learn more
variable
Redivis type
variable
integer
float
variable
Redivis type
boolean
boolean
variable
boolean
variable
boolean
variable
Redivis type
variable
Redivis type
variable
string
literal
Redivis type
boolean
boolean
literal
Redivis type
variable
integer
float