Z
zartan
I am trying to run a query that will rank employees sales based on a
series of baselines I have created. Let's say I have a table called
t-salesbaselineN which looks like this:
SalesAMT Level
1501-2000 1
1000-1500 2
0-999 3
And a table called t-salesbaselineS like this:
SalesAMT Level
2501-4000 1
2000-2500 2
0-2000 3
Then I have a Sales table called t-empsales which looks like this:
Name Sales Region
Bob 1001 N
Jim 1501 N
Joe 800 S
Ted 1001 S
I need to run a query which will produce a result that looks like this.
Which basically ranks based on my baselines and the region the employee
is in.
Name Sales Region Rank
Bob 1001 N 1
Jim 1501 N 2
Joe 800 S 3
Ted 1001 S 3
Can something like this be done? I've spent the last couple weeks
scouring the previous posts and I can't find anything exactly what I
am looking for. Any help I can get would be greatly appreciated
Thanks
Jeremy
series of baselines I have created. Let's say I have a table called
t-salesbaselineN which looks like this:
SalesAMT Level
1501-2000 1
1000-1500 2
0-999 3
And a table called t-salesbaselineS like this:
SalesAMT Level
2501-4000 1
2000-2500 2
0-2000 3
Then I have a Sales table called t-empsales which looks like this:
Name Sales Region
Bob 1001 N
Jim 1501 N
Joe 800 S
Ted 1001 S
I need to run a query which will produce a result that looks like this.
Which basically ranks based on my baselines and the region the employee
is in.
Name Sales Region Rank
Bob 1001 N 1
Jim 1501 N 2
Joe 800 S 3
Ted 1001 S 3
Can something like this be done? I've spent the last couple weeks
scouring the previous posts and I can't find anything exactly what I
am looking for. Any help I can get would be greatly appreciated
Thanks
Jeremy