Discuss How to Rank a Group in the MySQL Help forum on Dev Shed. How to Rank a Group MySQL Help forum discussing administration, SQL syntax, and other MySQL-related topics. MySQL is an open-source relational database management system (RDBMS).
Time spent in forums: 4 h 57 m 26 sec
Reputation Power: 2
How to Rank a Group
I have a new problem.
I have an orders table
I have lots of branches from different companies creating orders into the orders table.
What I would like to get out of the orders table is the highest ranking branch for each company.
So i would select a company. This company has however many branches. Then i would like to rank the branches by the amount of orders they have placed and then rank the branches ASC or DESC.