SQL statement to list and country countries in SQL

Let's say I have a some rows like this in a table:

SWEDEN
MEXICO
USA
SWEDEN
GERMANY
RUSSIA
MEXICO
SWEDEN

Now I need to create a script to count the countries and list them like this:

Country    Amount of countries
SWEDEN        3
USA           1
MEXICO        2
RUSSIA        1
GERMANY       1

I'm stuck at:

SELECT Country
FROM dbo.Customers

How do I only show them once and create a row and count them?

Thanks a lot..

Answers


try

SELECT Country, count(*)
FROM dbo.Customers
group by Country

Need Your Help

FloatingActionButton, square button below API level 17

android material-design android-design-library

I am using android.support.design.widget.FloatingActionButton from the new Design Support library 22.2.0, in my layout file. It is working fine but it shows a square button below API level 17

The torrent info_hash parameter

hash bittorrent url-parameters

How does one calculate the info_hash parameter? Aka the hash corresponding to the info dictionar??