How to select distinct values in Google Bigquery?
Query:
SELECT DISTINCT cc_info
FROM user
WHERE date = ?
Thanks!
For all who have come to find the DISTINCT method in BigQuery, and who needs to use unique field feature for tables having large columns, using GROUP BY
as mentioned by tning won't be possible.
As of 2020, BigQuery has DISTINCT modifier. You need to wrap your query as:
SELECT DISTINCT usr.cc_info
FROM (
SELECT *
FROM user
WHERE date = ?
) usr
This could be very handy for people shifting from other SQL products.