You have to specify which carrier, since they all use different formulae.
For example, on AC, Z is revenue standby (youth/student, etc.) On CX, it is first class reward inventory.
Some basics:
P,F,A: First Class. P and F are usually revenue, A is usually discount. (But not on CO).
J,C,D: Business class. C is common in the US for revenue, but that is discount in Canada. D is reward with AC, but discount with SQ.
Usually all the rest are economy fares, ranging from Y or M at the top (but M is way down the chain on AA and CP)
Not really a simple answer on this one...