SELECT DISTINCT Values from a Bigquery - Syntax

A SELECT DISTINCT statement discards duplicate rows and returns only the UNIQUE remaining rows

SELECT DISTINCT * FROM `MyProjectId`.DatasetName.MyTable;

You can extend the query to see distinct values per column as well,

SELECT DISTINCT Emp_Name, Location FROM `MyProjectId`.DatasetName.Employee;

nVector

posted on 20 Sep 19

Enjoy 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