1

i have a large mysql database table in which one column contains values ranging from 1 to 9 what query can i give so that i can get the count of 1s and 2s and 3s ... 9s in that column in the database ?

2 Answers 2

3
select column, count(*) from table group by column 
Sign up to request clarification or add additional context in comments.

Comments

2

You use grouping:

select TheValue, count(*) from TheTable group by TheValue order by TheValue 

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.