JDBC Driver for Microsoft SQL Server Analysis Services

Build 24.0.9062

集計関数

COUNT

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

SELECT COUNT(*) FROM [AdventureWorksDW2012Multidimensional-SE].[Adventure Works].Customer WHERE Country = 'Australia'

COUNT(DISTINCT)

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

SELECT COUNT(DISTINCT Country) AS DistinctValues FROM [AdventureWorksDW2012Multidimensional-SE].[Adventure Works].Customer WHERE Country = 'Australia'

AVG

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

SELECT Education, AVG(AnnualRevenue) FROM [AdventureWorksDW2012Multidimensional-SE].[Adventure Works].Customer WHERE Country = 'Australia'  GROUP BY Education

MIN

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

SELECT MIN(AnnualRevenue), Education FROM [AdventureWorksDW2012Multidimensional-SE].[Adventure Works].Customer WHERE Country = 'Australia' GROUP BY Education

MAX

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

SELECT Education, MAX(AnnualRevenue) FROM [AdventureWorksDW2012Multidimensional-SE].[Adventure Works].Customer WHERE Country = 'Australia' GROUP BY Education

SUM

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

SELECT SUM(AnnualRevenue) FROM [AdventureWorksDW2012Multidimensional-SE].[Adventure Works].Customer WHERE Country = 'Australia'

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