Newbie on SQL and BigQuery in general. How to count the count of a column in BigQuery? As you can see from the code sample, the query returns the count of appName as WhitelistNames, but I would like to get a count of WhitelistNames.
SELECT
COUNT(appName) AS WhitelistNames,
bridgeToken
FROM (
SELECT
bridgeToken,
appName
FROM
[DB]
GROUP BY
bridgeToken,
appName )
GROUP BY
bridgeToken
ORDER BY
WhitelistNames DESC
Current query return is:
Row UniquebridgeToken WhitelistEntries
1 11111 5
2 22222 13
3 33333 3
4 44444 3
5 55555 3
But I would like to count the occurrence of UniquebridgeToken like below. Thanks in advance.:
Row WhitelistEntries BridgeCount
1 13 1
2 5 1
3 3 3