Table relationships (foreign keys) in a database are often not obvious. When you make a mistake joining them you end up with seriously incorrect results.