Hello,
I have a table with users:
name | country |
.. | UK |
.. | US |
.. | US |
.. | UK |
.. | FR |
.. | FR |
.. | UK |
.. | UK |
.. | DE |
.. | DE |
.. | UK |
.. | CA |
.
.
What is the most efficient way with ActiveRecord to get the list of countries in my view and for each country how many users are from, so:
US 123
UK 54
DE 33
.
.
.