Forum Moderators: coopster
+-----------+-------------------------------------+
¦ ip ¦ platform ¦
+-----------+-------------------------------------+
¦ xx.x... ¦ Windows ¦
¦ xx.x... ¦ Linux ¦
¦ xx.x... ¦ Windows ¦
¦ xx.x... ¦ Windows ¦
¦ xx.x... ¦ Mac ¦
¦ xx.x... ¦ Mac ¦
+-----------+-------------------------------------+
1. Windows (50%)
2. Mac (33%)
3. Linux (0,16%)
[mysql.com...]
Counting Rows with MySQL [mysql.com]
If you get each total you can then use php to turn those into percentages.
Well.. they aren't new functions but I know what you mean. ;)
The only problem with using COUNT is that we don't know how many distinct platforms there are to begin with and then we'll need to get the names of each platform to display along with the percentage. But I think some combination of COUNT and DISTINCT [mysql.com] should fix you up.