Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Product Manuals » ElevateDB Version 2 SQL Manual » Aggregate Functions » SUM |
SUM([DISTINCT] <NumericExpression>|<IntervalExpression>) <NumericExpression> = Type of: SMALLINT INTEGER|INT BIGINT FLOAT DECIMAL|NUMERIC <IntervalExpression> = Type of: INTERVAL YEAR INTERVAL YEAR TO MONTH INTERVAL MONTH INTERVAL DAY INTERVAL DAY TO HOUR INTERVAL DAY TO MINUTE INTERVAL DAY TO SECOND INTERVAL DAY TO MSECOND INTERVAL HOUR INTERVAL HOUR TO MINUTE INTERVAL HOUR TO SECOND INTERVAL HOUR TO MSECOND INTERVAL MINUTE INTERVAL MINUTE TO SECOND INTERVAL MINUTE TO MSECOND INTERVAL SECOND INTERVAL SECOND TO MSECOND INTERVAL MSECOND
Same as input, except for the following types: A SMALLINT expression is promoted to an INTEGER An INTEGER expression is promoted to a BIGINT This is done to prevent numeric overflows
SELECT SUM(Amount) AS TotalAmount FROM Transactions SELECT CAST(TransDateTime AS DATE) AS TransDate, SUM(Amount) AS TotalAmount FROM Transactions GROUP BY TransDate
Deviation | Details |
None |
This web page was last updated on Thursday, November 16, 2023 at 10:39 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |