mysql - How to count tuples containing the same value? -


suppose these columns:

 **name**     **course**    andy          bio             brian         math    andy          chem 

how can count name "andy" appeared twice?

you use group , count name

something like:

select name, count(*) my_table group name 

here's sqlfiddle demonstrate: http://sqlfiddle.com/#!2/966da/1


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -