Quantcast
Viewing all articles
Browse latest Browse all 17897

Count times that appears in a table

Hello,

 

I have a table similar to the below one:

 

Name                  Amount

----------------------------

peter                    5

Mark                    4

peter                    3

Matthias               7

Jean                     5

Luque                  2 

peter                   23

Jean                    45

 

I create a table to see how many time appears each one, so similar like this:

 

Name                  count(name)

----------------------------

peter                    3

Mark                    1

Matthias               1

Jean                     2

Luque                  1 

 

what I want to get is a table to see how many times appears each count(name) in the table, something like:

 

count(name)      times

------------------------

3                          1

2                           1

1                           3

 

It means there is 1 person that appears 3 times, 1 person appears 2 times and 3 people 3 times.

How can I do it?

 

Thanks.

 

 


Viewing all articles
Browse latest Browse all 17897

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>