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.