SQL Plus - Compute

Card Puncher Data Processing

About

COMPUTE in combination with the BREAK command, calculates and prints summary lines using various standard computations.

Syntax

COMP[UTE] [function [LAB[EL] text] ...
   OF {expr|column|alias} ...
   ON {expr|column|alias|REPORT|ROW} ...]

Summary function

The following summary function are available:

  • SUM : Sum of the values in the column.
  • MINIMUM: Minimum value in the column.
  • MAXIMUM: Maximum value in the column.
  • AVG: Average of the values in the column.
  • STD: Standard deviation of the values in the column.
  • VARIANCE: Variance of the values in the column.
  • count: Number of non-null values in the column.
  • NUMBER: Number of rows in the column.

Example

See SQL Plus - Formatting Reports

Grand Total

BREAK ON REPORT
COMPUTE SUM OF "Segment Block" ON REPORT

How to

list all compute definition

Enter COMPUTE with no clauses to list the current COMPUTE definition.





Discover More
Card Puncher Data Processing
SQL Plus - Break

BREAK specifies where changes occur in a report and the formatting action to perform, such as: suppressing display of duplicate values for a given column skipping a line each time a given column value...
Card Puncher Data Processing
SQL Plus - Clear

CLEAR resets or erases the current value or setting for the specified option. where option represents one of the following clauses: BRE[AKS] BUFF[ER] COL[UMNS] COMP[UTES] SCR[EEN] SQL...
Card Puncher Data Processing
SQL Plus - Command Reference

Commands Description @ @@ / ACCEPT APPEND ARCHIVE ATTRIBUTE BREAK BTITLE CHANGE CLEAR COLUMN COMPUTE CONNECT COPY Copies data from a query to a table in the same or another...
Card Puncher Data Processing
SQL Plus - Formatting Reports

How to format SQLplus output (ie ) All below parameters can be configured in the login script. Through the SQLPlus COLUMN command with the heading options, you can change the column headings...



Share this page:
Follow us:
Task Runner