Skip to content
Advertisement

MySQL Scoring of values from select across rows and multiple columns

So I have a scheme like the following:

What I want to achieve is to get the top 6 unique occurring numbers in order of the count across all rows and columns.

Advertisement

Answer

You need to unpivot. In MySQL, this is typically done using union all:

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement