This section will explain how we can analyze or query in store data to generate some statistics. We will cover the following:
- Calculating the page hit from each country
- Calculating the count of each browser
- Calculating the count of each operating system
Run the following command on the MySQL console to calculate the page hit from each country:
mysql> select country, count(*) from apachelog group by country;
+---------------------------+----------+
| country | count(*) |
+---------------------------+----------+
| Asia/Pacific Region | 9 |
| Belarus | 12 |
| Belgium | 12 |
| Bosnia and Herzegovina | 12 |
| Brazil | 36 |
| Bulgaria | 12 |
| Canada | 218 |
| Europe | 24 |
| France | 44 |
| Germany | ...