I have a query that summarizes the quantities of defects in a list of categories and Sorts them in Descending Order, (for a Pareto) so the results look like the following:
What I am looking for is a Rank, so that the results would look like
Defect Qty Rank
Off_Color 50 1
Warped 40 2
Broken 30 3
Can anyone explain the SQL for doing that? Thanks.