Intro to Analytic Queries

Vertica analytic functions are SQL functions based on the ANSI 99 standard.

Analytic Functions in Vertica

Analytic functions handle complex analysis and reporting tasks. For a list of Vertica analytic functions, see the core documentation.

Analytic vs. Aggregate

Some analytic functions aggregate data, so it is important to distinguish between analytic functions that perform aggregations and aggregate functions. The similarities and differences are summarized below.

Analytic functions Aggregate functions
  • Return the same number of rows as the input
  • Return a single summary value
    • The groups of rows on which an analytic function operate are defined by window partitioning and window frame clauses.
      • The groups of rows on which an aggregate function operate are defined by the SQL GROUP BY clause.

        Working with the Window Clauses

        In an analytic function’s OVER clause you can specify a window (or group of rows) to analyze.For more information, see the following topics in the Vertica documentation:

        Learn More

        To learn more about analytic functions in Vertica, read our documentation.