Skip to content

Instantly share code, notes, and snippets.

@JosiahSiegel
Created November 26, 2014 17:18
Show Gist options
  • Save JosiahSiegel/23c5fc44547c6c1fc537 to your computer and use it in GitHub Desktop.
Save JosiahSiegel/23c5fc44547c6c1fc537 to your computer and use it in GitHub Desktop.
#Netezza Deduplicate all data in table
delete from TEST_DATA c where exists
(select rowid from TEST_DATA a
left outer join(
select min (rowid) as min_row, MSG_ID, MSG_ID2
FROM TEST_DATA
GROUP BY MSG_ID, MSG_ID2
) x on a.rowid = x.min_row
where x.min_row is null and a.rowid = c.rowid);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment