I\'m doing some basic sql on a few tables I have, using a union(rightly or wrongly)
but I need remove the duplicates. Any ideas?
select * from calls
Since you are still getting duplicate using only UNION I would check that:
That they are exact duplicates. I mean, if you make a
SELECT DISTINCT * FROM (
you do get fewer files?
That you don't have already the duplicates in the first part of the query (maybe generated by the left join). As I understand it UNION it will not add to the result set rows that are already on it, but it won't remove duplicates already present in the first data set.