Eliminate duplicates, keep first instance

Please see attached description of problem in Word.
ee-query.doc
ejr19592004Asked:
Who is Participating?
 
ejr19592004Connect With a Mentor Author Commented:
@Brichsoft it's resolved if

select acct, min(date) from table group by acct

means select acct (column b in the spreadsheet), min(date) - column a in the spreadsheet from table group by acct

Yields 1136 records from the dataset and only the first instance of each duplicate.

I will know in about an hour or so when I get into work
0
 
Bhavesh ShahLead AnalysistCommented:
Hi,

There are no rows with green color also I'm not able to find any duplicate rows.
PLease update ur list
0
 
ejr19592004Author Commented:
My apologies. Late in the day, just leaving work. I have modified the word document and added a spreadsheet with sample data. Please advise if you have any questions.

Ta

ee-query.doc
Sample-Data.xls
0
Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

 
Priya PerumpilavilConnect With a Mentor Software EngineerCommented:
try this
select min(date), id from table group by id
0
 
ejr19592004Author Commented:
This looks right, except I need to include the acct field (field B in the spreadsheet) in the output as well as in:

select acct, min(date) from table group by acct


If by ID you mean the account number than we are good.
0
 
Bhavesh ShahLead AnalysistCommented:
Hi,

Priya meant that only......
0
 
ejr19592004Author Commented:
@Birchsoft Priya meant that only? Only what?
0
 
ejr19592004Author Commented:
Just so that we are clear. When I run a remove duplicate code on the file by acct code, that is column B in the spreadsheet, I end up with 1136 records.

If I run the statement select acct, min(date) from table group by acct, which I will later on today, I need to end up with 1136 records.

0
 
Bhavesh ShahLead AnalysistCommented:
Hi,

your problem is resolved?? or you have confusion sort of....
0
 
ejr19592004Author Commented:
Fits the bill. Ta
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.