1002
APPX
Appendix 14 List of Available SQL Commands for CPU Module Database Access Function
Aggregate Function
AVG
This command obtains a mean value.
■
Application example
• To obtain the mean value of fld1 from table1 (including overlapped values)
SELECT AVG ("fld1") FROM "table1";
• To obtain the mean value of fld1 from table1 (excluding overlapped values)
SELECT AVG (DISTINCT "fld1") FROM "table1";
COUNT
This command aggregates the number of records.
■
Application example
• To obtain the number of records of fld1 from table1 (including overlapped values)
SELECT COUNT ("fld1") FROM "table1";
• To obtain the number of records of fld1 from table1 (excluding overlapped values)
SELECT COUNT (DISTINCT "fld1") FROM "table1";
MAX
This command obtains a maximum value.
■
Application example
• To obtain the maximum value of fld1 from table1
SELECT MAX ("fld1") FROM "table1";
MIN
This command obtains a minimum value.
■
Application example
• To obtain the minimum value of fld1 from table1
SELECT MIN ("fld1") FROM "table1";
SUM
This command obtains the total.
■
Application example
• To obtain the total of fld1 from table1 (including overlapped values)
SELECT SUM ("fld1") FROM "table1";
• To obtain the total of fld1 from table1 (excluding overlapped values)
SELECT SUM (DISTINCT "fld1") FROM "table1";
Syntax
AVG ([numeric expression])
Syntax
COUNT [target]
Syntax
MAX ([numeric expression])
Syntax
MIN ([numeric expression])
Syntax
SUM ([numeric expression])
Содержание MELSEC iQ-R-R00CPU
Страница 2: ......
Страница 151: ...9 MONITOR FUNCTION 9 1 Real Time Monitor Function 149 9 MEMO ...
Страница 323: ...18 SEQUENCE SCAN SYNCHRONIZATION SAMPLING FUNCTION 321 18 MEMO ...
Страница 330: ...328 20 ROUTING SETTING 20 3 Precautions MEMO ...
Страница 423: ...26 BASIC CONCEPT 26 8 State Transition of the Redundant System 421 26 MEMO ...
Страница 524: ...522 30 MAINTENANCE AND INSPECTION FOR A REDUNDANT SYSTEM 30 1 Module Replacement in the Redundant System MEMO ...
Страница 1009: ...APPX Appendix 14 List of Available SQL Commands for CPU Module Database Access Function 1007 A MEMO ...
Страница 1014: ...1012 APPX Appendix 15 Added and Enhanced Functions MEMO ...
Страница 1027: ......