PSLine2000Documentation/Queries/C1 Compare totals.md

1.0 KiB

C1 Compare totals

Analysis generated on: 4/2/2025 9:57:19 AM

SQL Statement

SELECT Sum([C1 Compare].ttl) AS SumOfttl, Sum([C1 Compare].GrossWt) AS SumOfGrossWt
FROM [C1 Compare];

Dependencies

  • None

Parameters

  • None

What it does

SQL Query Description

Purpose

This SQL query calculates the sum of two specific columns from a table named [C1 Compare].

Columns Used

  • [C1 Compare].ttl: The column containing the total weight.
  • [C1 Compare].GrossWt: The column containing the gross weight.

Query Details

The query uses the Sum aggregate function to calculate the total of each column.

SELECT 
  Sum([C1 Compare].ttl) AS SumOfttl, 
  Sum([C1 Compare].GrossWt) AS SumOfGrossWt
FROM 
  [C1 Compare];

Result

The query returns two values:

  • SumOfttl: The total of the [C1 Compare].ttl column.
  • SumOfGrossWt: The total of the [C1 Compare].GrossWt column.

These sums are calculated by adding up all the values in each column.