I have my following sql query, the problem when I run it is that it shows me some duplicate records, I would appreciate if you can help me