Excel Add-In for ServiceNow

Build 24.0.9062

集計関数

COUNT

クエリ条件に一致する行の数を返します。

SELECT COUNT(*) FROM incident WHERE category = 'request'

COUNT(DISTINCT)

クエリ条件に一致する、null 以外の個別のフィールド値の数を返します。

SELECT COUNT(DISTINCT sys_id) AS DistinctValues FROM incident WHERE category = 'request'

AVG

カラムの値の平均を返します。

SELECT priority, AVG(priority) FROM incident WHERE category = 'request'  GROUP BY priority

MIN

カラムの値の最小値を返します。

SELECT MIN(priority), priority FROM incident WHERE category = 'request' GROUP BY priority

MAX

カラムの値の最大値を返します。

SELECT priority, MAX(priority) FROM incident WHERE category = 'request' GROUP BY priority

SUM

カラムの値の合計を返します。

SELECT SUM(priority) FROM incident WHERE category = 'request'

Copyright (c) 2024 CData Software, Inc. - All rights reserved.
Build 24.0.9062