開発メモ

開発用のメモです。

SOQL 集計関数

SUM : 合計

SELECT Sum(qty) FROM OrderProducts;

Max : 最大

SELECT Max(qty) MAX_QTY FROM OrderProducts;

Min : 最小

SELECT Min(qty) MIN_QTY FROM OrderProducts;

Count 件数

SELECT Count(qty) COUNT_QTY FROM OrderProducts;

Average 平均

SELECT Avg(qty) AVG_QTY FROM OrderProducts;

Count Distinct 重複を除隊した件数

SELECT Count_Distinct(Name) CD_NAME FROM OrderProducts;
Twitter: @asahina_alice