SQL query to get count of each group in Google BigQuery
Data
\n\nMetric\n3\n3\n6\n6\n
\n\nTo get the count of each Group:
SELECT Metric, COUNT(Metric) `Count`
FROM `project.dataset.your_table`
GROUP BY Metric
Result:
\n\nMetric | Count\n6 | 2\n3 | 2
Ryan-Dallas
posted onEnjoy great content like this and a lot more !
Signup for a free account to write a post / comment / upvote posts. Its simple and takes less than 5 seconds
Post Comment