简体   繁体   中英

delete data from Bigquery table that has all column matching value

I have a table in BigQuery and that has total 620 columns. I need to delete duplicate records that has all 620 columns with matching values. Can anyone help me on this. thanks

Use below

select * from your_table t
qualify 1 = row_number() over(partition by format('%t', t))    

another option is

select as value any_value(t)
from your_table t
group by format('%t', t)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM