« Back to Index

[SQL get unique values using BigQuery]

View original Gist on GitHub

Tags: #bigquery #google #data #sql #unique

SQL get unique values using BigQuery.sql

SELECT
  http.status_code
FROM
  `foo-bar.baz.qux`
GROUP BY
  http.status_code
LIMIT
  20
  
/*
Project: foo-bar
Dataset: baz
Table: qux

Because the datasource includes hyphens we need to wrap it in backticks.
*/