Comment

Your Awesome Drone Movie of the Day: Superman With a GoPro

216
wrenchwench3/19/2014 6:50:50 pm PDT

re: #210 CuriousLurker

One more thing: The following query lets me see all the data for all duplicate records, which is great.

SELECT *
FROM inventory
WHERE inv_id IN (
SELECT inv_id
FROM inventory
GROUP BY inv_id
HAVING count(inv_id) > 1
)
ORDER BY inv_id

BUT, if I wanted to just select duplicate records where the inv_id and company_name are the same but the exp_date is later… can anyone nudge me towards the best statements/clauses to use in my query?

IOW, what I’m saying is I’m desperately trying to avoid having to manually compare like 400 records and drop 200 of them. O_o

Now YOU’RE not speaking English!