MySQL Scoreboard with Ranking

I am building a simple scoring application and want to output a scoreboard using mysql.
This is an example of how I would like to output (from google images)
scoreboard example
These are my tables
But i'm stuck on how to achieve this query...
I need each ROUND to have its own column with to total of each team at the end.

Can anyone help me this this??
Steve TinsleyAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Russell FoxDatabase DeveloperCommented:
What you want is called a "pivot" or "crosstab" query, turning rows into columns. Oracle and SQL have simplified syntax, but I don't think MySQL does. The usual issue is that you have to know how many columns (rounds) there will be and code accordingly, so if that's dynamic you may need to code around it. You might also look into a reporting solution: SSRS has column groups which accomplish the same thing, or there's an open-source report server called BIRT that can do crosstab queries. Spreadsheets can pivot data, too. Here are a couple of ways to do it in MySQL, though:

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.