SQL Find Duplicate Record in a Table
Many times you may need to write a SQL to find duplicate record in a table. I wrote a SQL statement to find duplicate record in the table. There are two variant for same result. Try both of them and see which one is best for your job.
SELECTstate, district, market_center, crop, grade, MAX(date_arrival)FROM cropsGROUP BY state, district, market_center, crop, gradeORDER BY date_arrivalDESCOR
SELECT DISTINCT state, district, market_center, crop, gradeFROM cropsORDER BY date_arrivalIf you have any other method, do drop a comment below.