T
Tim
Hi,
I have three tables I need help with. First is an
employee table, second is a sales person table and third
is a corporate office sales people table. When I run a
query to compare the corporate sales people to the whole
sales team I only return a result that has the same number
of lines as the corporate sales people. For example, if I
query to see all the sales people who had more sales than
a corporate sales person, that would be all the corporate
sales people individually compared to all the sales people
nationwide including the corporate sales people, I get a
result that is only 21 rows of data. We have 21 corporate
sales people and over 200 sales people nationwide. The
result of the query is one corporate sales person compared
to one national sales person.
What I would like to see is a query that returns:
# Corp Name Sales # Nat Name Sales
123 John Smith 100,000 234 Jane Doe 125,000
123 John Smith 100,000 456 Jane Smith 130,000
123 John Smith 100,000 345 John Doe 150,000
456 Jane Smith 130,000 345 John Doe 150,000
456 Jane Smith 130,000 567 Joe Blow 175,000
I hope this makes sense. I think it might be the
relationships between the tables that need to be changed
but I am not sure. Please advise.
Regards, Tim
I have three tables I need help with. First is an
employee table, second is a sales person table and third
is a corporate office sales people table. When I run a
query to compare the corporate sales people to the whole
sales team I only return a result that has the same number
of lines as the corporate sales people. For example, if I
query to see all the sales people who had more sales than
a corporate sales person, that would be all the corporate
sales people individually compared to all the sales people
nationwide including the corporate sales people, I get a
result that is only 21 rows of data. We have 21 corporate
sales people and over 200 sales people nationwide. The
result of the query is one corporate sales person compared
to one national sales person.
What I would like to see is a query that returns:
# Corp Name Sales # Nat Name Sales
123 John Smith 100,000 234 Jane Doe 125,000
123 John Smith 100,000 456 Jane Smith 130,000
123 John Smith 100,000 345 John Doe 150,000
456 Jane Smith 130,000 345 John Doe 150,000
456 Jane Smith 130,000 567 Joe Blow 175,000
I hope this makes sense. I think it might be the
relationships between the tables that need to be changed
but I am not sure. Please advise.
Regards, Tim