I have a table called 'event1' containing info such as:
| Name | Age | Nationality |
I want to display, for instance, a nationality and how many times a certain nationality is repeated.
So for example:
India - 5
Australia - 10
US - 10
The query I came up with was
SELECT nationality, COUNT(nationality) AS Total
FROM event1 GROUP BY nationality HAVING COUNT(nationality)>=1
I'm not sure if that is correct.
How can I display the above example using PHP?