-2

I have BQ table which has duplicates of rows with same details. I want to keep one row and wish to delete all other duplicate rows.

Example: Empno,empname, salary 1,Sam,1000 1,Sam,1000 1,Sam,1000 1,Sam,1000

My expectations:

siva
  • 1
  • I think your question may be a [duplicate of this one](https://stackoverflow.com/questions/36675521/delete-duplicate-rows-from-a-bigquery-table). Do those answers help? If you think it's different in an important way, please edit your question to clarify. – Paddy Alton Dec 10 '22 at 12:51
  • Anyway, perhaps the quickest solution would be to run a query like `SELECT DISTINCT * FROM yourds.yourtable` and save the results as a new BigQuery table. – Paddy Alton Dec 10 '22 at 12:52

1 Answers1

0

If the table is small we can use select distinct. But if the tables are more than 500gb . The above solution is not recommended. Because table scan going to be billed.

Ranji
  • 1
  • 1