0

I'll preface with the join's and examples that were similar found, I could not get to work and i appreciate any help. I have postgres 9.X table with a few columns: datetime|control_id|content|

How do I remove additional records that have the same control_id? I do not care about which record's datetime and content is kept as the content will be duplicate, but the datetime is unique (it does not matter which datetime is kept). eg

Input may look like:

01012015|333|blahblah
01042014|333|blahblah
02032015|333|blahblah
10102014|388|bleehbleeh
11112014|388|bleehbleeh

Output I want:

01012015|333|blahblah
10102014|388|bleehbleeh

Any date can be in the output as long as the control_id column only exists once. A select distinct didn't work for me as the datetime column is unique.

bbrown
  • 1
  • 1

0 Answers0