Home > OS >  SQL self join to eradicate duplicate keys
SQL self join to eradicate duplicate keys

Time:11-25

I have a table with below columns:

Column1 Column2 Column3
A Hello NULL
A NULL WORLD

I want the above table to transform like below:

Column1 Column2 Column3
A Hello WORLD

I'm using Snowflake DataWarehouse. Need help in the above transformation using SQL

CodePudding user response:

select column1,
       max(column2) as column2,
       max(column3) as column3
  from your_table
 group by column1;
  • Related