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

Teradata Vantage™ - Native Object Store Getting Started Guide - 17.20

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
Language
English (United States)
Last Update
2024-04-05
dita:mapPath
tsq1628112323282.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
jjn1567647976698
Product Category
Teradata Vantage

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. See Setting Up to Run Examples.
  3. Run the following command to get the maximum and minimum values for a specific payload attribute, Flow in this example. It executes against the foreign table and considers all records contained within the object as specified by the LOCATION clause in the foreign table.
    SELECT MAX(columnN), MIN(columnN)
    FROM table_name;

Example: Finding Maximum and Minimum Values

If not already done, create the foreign table. See Setting Up to Run Examples.

SELECT MAX(Flow), MIN(Flow)
FROM riverflow;

Your result will be similar to the following:

Maximum(Flow)  Minimum(Flow)
-------------  -------------
         9.91          -9.72