Find the MAX and MIN Values | Native Object Store ( NOS ) | Teradata Vantage - 17.10 - Finding Maximum and Minimum Values - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - Native Object Store Getting Started Guide

Advanced SQL Engine
Teradata Database
Release Number
Release Date
July 2021
Content Type
Programming Reference
Publication ID
English (United States)

The examples use a sample river flow data set. To use your own data, replace the table and column names, and authorization object. See Variable Substitutions for Examples for the credentials and location values for the sample data set.

  1. To run NOS-related commands, log on to the database as a user with the required privileges.
  2. If it does not exist, create the foreign table or ask your database administrator to create the foreign table called riverflow_parquet. See Setting Up to Run Parquet Examples.
  3. Run the following command to get the maximum and minimum values for a specific attribute, Flow in this example. It executes against the foreign table called riverflow_parquet and considers all records contained within the object as specified by the LOCATION clause in the foreign table.
    SELECT MAX (Flow) 
         , MIN (Flow) 
      FROM riverflow_parquet;

    Your result will be similar to the following:

    Maximum(Flow)  Minimum(Flow)
    -------------  -------------
          1570.00           0.00