Please help with query

J

jumpstartr

I really need help me with this. I'm sure it's really easy for most. I
really appreciate any help. Thanks!

I have tables Employees and Sales. In Employees the yes/no field
IsManager denotes Manager. Sales has Year, Region, EmplyeeID, Sales
and other results of the sale.

I want to compare sales for several years between 4 salesmen. One of
them is also the Manager. The trouble is that all have worked during
different time periods from each other in this Dept. except for the
Manager, who has been here all years and worked with everyone. Plus
the sales are in different regions. A query results in this data set
that has the correct information but some not pertinent data as well.

So, the data now look like this but how can I get the reduced data
set(s) I've shown farther down below; The reduced data in averages? I
think I need to specify criteria within some fileds that set certain
conditions to be matched in other fields.

Year Region Salesman Sales Position
1997 2 Cabstone 6259 Manager
1998 7 Cabstone 1018 Manager
1999 11 Cabstone 2749 Manager
1999 11 Jumper 2927 Salesman
2000 16 Cabstone 4460 Manager
2000 16 Jumper 4985 Salesman
2000 17 Cabstone 5718 Manager
2001 32 Cabstone 4424 Manager
2002 42 Cabstone 3496 Manager
2002 43 Cabstone 2583 Manager
2003 58 Cabstone 4547 Manager
2003 58 Dunsten 5027 Salesman
2003 59 Cabstone 3433 Manager
2004 62 Cabstone 5487 Manager
2004 62 Dunsten 5068 Salesman
2004 62 Sevenrude 4744 Salesman
2004 63 Cabstone 3236 Manager
2005 71 Cabstone 3286 Manager
2005 71 Dunsten 3517 Salesman
2005 71 Sevenrude 3754 Salesman
2006 79 Cabstone 3003 Manager
2006 79 Dunsten 2808 Salesman
2006 79 Jumper 2543 Salesman
2006 79 Sevenrude 3749 Salesman
2006 80 Cabstone 2668 Manager
2006 80 Sevenrude 3125 Salesman

Jumper vs Cabstone
Cabstone AvgSales Manager
Jumper AvgSales Salesman

Dunsten vs Cabstone
Cabstone AvgSales Manager
Dunsten Avg Salesman

Sevenrude vs Cabstone
Cabstone Avg Manager
Sevenrude Avg Salesman
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top