I am selecting with this Command all the rows from column:
SELECT city From Users
With this i am getting all the cities from my table.
Now i want to select all the column data and the count for each one.for example:
New York 20
Los angeles 46
London 35
What should be the command for this?
You can use a GROUP BY
SELECT City, COUNT(Field)
FROM Users
GROUP BY City
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With