CData Python Connector for Google Analytics

Build 20.0.7587

Aggregate Functions

COUNT

Returns the number of rows matching the query criteria.

SELECT COUNT(*) FROM Traffic WHERE Transactions = '0'

COUNT(DISTINCT)

Returns the number of distinct, non-null field values matching the query criteria.

SELECT COUNT(DISTINCT Browser) AS DistinctValues FROM Traffic WHERE Transactions > '0'

AVG

Returns the average of the column values.

SELECT DeviceCategory, AVG(AnnualRevenue) FROM Traffic WHERE Transactions > '0'  GROUP BY DeviceCategory

MIN

Returns the minimum column value.

SELECT MIN(AnnualRevenue), DeviceCategory FROM Traffic WHERE Transactions > '0' GROUP BY DeviceCategory

MAX

Returns the maximum column value.

SELECT DeviceCategory, MAX(AnnualRevenue) FROM Traffic WHERE Transactions > '0' GROUP BY DeviceCategory

SUM

Returns the total sum of the column values.

SELECT SUM(AnnualRevenue) FROM Traffic WHERE Transactions = '0'

Copyright (c) 2020 CData Software, Inc. - All rights reserved.
Build 20.0.7587