I need to join multiple tables for the data I want. However, two fields exists on separate tables that, when the query is executed, returns a cartesian product, grossly inflating the actual count of my data. I need a different column from two different tables. I can write two separate queries and then extract the data to Excel and manipulate it there (which I've done) but there's got to be a more efficient way.
Can I write a sub-query to get around this? If so, where would I write the sub-query?
SELECT a.field
,b.field
,c.field
,d.field
FROM table a
INNER JOIN table b
ON...
INNER JOIN table c
ON...
INNER join table d
ON...
WHERE...
The above query results in a cartesian product. I am using SQUIRREL.
Thanks!