A function is a SQL component that manipulates data and returns a value that is not stored in the database, but is derived from calculating or reformatting values. Functions can be used to calculate or reformat values:
In SQL code, a function can be included as part of the SELECT statement, WHERE clause or HAVING clause, or it can exist outside of these SQL components. You can write functions in the SQL code, or in the Expression Builder.
You can use the following functions in GE Digital APM:
Note: Throughout this documentation, functions are grouped into categories according to how they are grouped in the Expression Builder.
In the following SQL code, the SUM function is displayed in bold text.
SELECT [Asset].[ASSET_ID_CHR] "Asset ID", Sum([Failure].[EFAIL_TOTCST_FROM]) "Total Failure Cost"
FROM [Asset] JOIN SUCC [Failure] ON {Asset Has Failure}
WHERE [Failure].[EFAIL TOTCST FRM] > 50000
GROUP BY [Asset].[ASSET ID CHR]
In this example, the SUM function is contained within the SELECT statement.
In the following SQL code, the SUM function is displayed in bold text and appears twice: once in the SELECT statement and once in the HAVING clause.
SELECT [Asset].[ASSET_ID_CHR] "Asset ID", Sum([Failure].[EFAIL_TOTCST_FROM]) "Total Failure Cost"
FROM [Asset] JOIN SUCC [Failure] ON {Asset Has Failure}
GROUP BY [Asset].[ASSET ID CHR]
HAVING Sum([Failure].[EFAIL TOTCST FROM]) > 5000
Copyright © 2018 General Electric Company. All rights reserved.