DELETE
FROM sheet1$
WHERE sheet1$.%%lockres%%
NOT IN (SELECT MIN(b.%%lockres%%)
FROM sheet1$ b
GROUP BY b.candidatecode, b.candidatename, b.currentyrsem, b.stream, b.streamsubject, b.subject, b.subjectcode, b.subjecttype, b.theorymarks, b.iamarks, b.theoryminmarks, b.theorymaxmarks, b.iaminmarks, b.iamaxmarks, b.credits, b.centername, b.result, b.collaboratorname)
Sheet1$ is a table name and candidatecode, candidatename, currentrysem, stream and all are the coloumn name of table......
FROM sheet1$
WHERE sheet1$.%%lockres%%
NOT IN (SELECT MIN(b.%%lockres%%)
FROM sheet1$ b
GROUP BY b.candidatecode, b.candidatename, b.currentyrsem, b.stream, b.streamsubject, b.subject, b.subjectcode, b.subjecttype, b.theorymarks, b.iamarks, b.theoryminmarks, b.theorymaxmarks, b.iaminmarks, b.iamaxmarks, b.credits, b.centername, b.result, b.collaboratorname)
Sheet1$ is a table name and candidatecode, candidatename, currentrysem, stream and all are the coloumn name of table......