JDBC Driver for SAP Business One

Build 24.0.9062

集計関数

COUNT

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

SELECT COUNT(*) FROM Orders WHERE DocType = 'dDocument_Items'

COUNT(DISTINCT)

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

SELECT COUNT(DISTINCT DocEntry) AS DistinctValues FROM Orders WHERE DocType = 'dDocument_Items'

AVG

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

SELECT DocType, AVG(DocNum) FROM Orders WHERE DocType = 'dDocument_Items'  GROUP BY DocType

MIN

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

SELECT MIN(DocNum), DocType FROM Orders WHERE DocType = 'dDocument_Items' GROUP BY DocType

MAX

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

SELECT DocType, MAX(DocNum) FROM Orders WHERE DocType = 'dDocument_Items' GROUP BY DocType

SUM

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

SELECT SUM(DocNum) FROM Orders WHERE DocType = 'dDocument_Items'

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