Query for de duplication

Moderator: NorbertKrupa

Post Reply
rsaveetha
Newbie
Newbie
Posts: 5
Joined: Sat Oct 31, 2015 2:53 pm

Query for de duplication

Post by rsaveetha » Fri Apr 22, 2016 12:17 pm

Hi,

I am new to Vertica and I am working on Data Cleaning. I have a source table(raw table) which may have duplicate records. I need to filter the records based on the columns given by user(maximun upto 3 columns) and insert into a target table.

I have written a query like this - INSERT INTO OUTPUTTABLE SELECT * FROM INPUTTABLE WHERE 1 GROUP BY column1,column2,column3;

This query is throwing an error that "Column "test_tb.col3" must appear in the GROUP BY clause or be used in an aggregate function"

ie Group by clause is expecting all the columns as in select *.

Can any one help me in correcting this query?

Post Reply

Return to “New to Vertica SQL”