I have this:
mdate mshift mmachine mQty
01/01/2004 1 machineA 50
01/01/2004 1 machineA 25
01/01/2004 1 machineA 15
01/01/2004 1 machineB 65
01/01/2004 1 machineB 45
01/01/2004 1 machineB 15
01/01/2004 2 machineA 55
01/01/2004 2 machineA 45
01/01/2004 2 machineA 10
I want this:
mdate mshift mmachine mQty RANK
01/01/2004 1 machineA 50 1
01/01/2004 1 machineA 25 2
01/01/2004 1 machineA 15 3
01/01/2004 1 machineB 65 1
01/01/2004 1 machineB 45 2
01/01/2004 1 machineB 15 3
01/01/2004 2 machineA 55 1
01/01/2004 2 machineA 45 2
01/01/2004 2 machineA 10 3
I have a list of the top 3 quantities for each date, shift, and machine group. I want to rank these in order from greatest to least.
mdate mshift mmachine mQty
01/01/2004 1 machineA 50
01/01/2004 1 machineA 25
01/01/2004 1 machineA 15
01/01/2004 1 machineB 65
01/01/2004 1 machineB 45
01/01/2004 1 machineB 15
01/01/2004 2 machineA 55
01/01/2004 2 machineA 45
01/01/2004 2 machineA 10
I want this:
mdate mshift mmachine mQty RANK
01/01/2004 1 machineA 50 1
01/01/2004 1 machineA 25 2
01/01/2004 1 machineA 15 3
01/01/2004 1 machineB 65 1
01/01/2004 1 machineB 45 2
01/01/2004 1 machineB 15 3
01/01/2004 2 machineA 55 1
01/01/2004 2 machineA 45 2
01/01/2004 2 machineA 10 3
I have a list of the top 3 quantities for each date, shift, and machine group. I want to rank these in order from greatest to least.