---
title: "How to get multiple count in sql"  
description: "How to get multiple count in sql"  
author: "benjamin richards"  
published: 2013-02-12  
updated: 2013-02-12  
canonical: https://www.mindstick.com/forum/589/how-to-get-multiple-count-in-sql  
category: "mssql server"  
tags: ["mssql server"]  
reading_time: 1 minute  

---

# How to get multiple count in sql

Hi MindStickians!

I have a [table](https://www.mindstick.com/articles/43918/how-to-design-table-using-bootstrap) in my [database](https://www.mindstick.com/articles/12226/use-of-database-in-sencha-extjs-and-insert-record-from-user-form-using-ajax) in which I have three columns:

[Article_ID] INT [IDENTITY](https://www.mindstick.com/articles/13090/icon-the-identity-of-your-brand) [PRIMARY KEY](https://www.mindstick.com/blog/214/primary-key),\
[Article_Title] NVARCHAR([Max](https://www.mindstick.com/articles/1155/count-max-min-function-in-excel)),\
[Article_Rating] INT

Now the [user](https://www.mindstick.com/articles/13001/multi-statement-table-valued-user-defined-function-in-sql-server) can enter a maximum number 5 in [rating](https://www.mindstick.com/articles/198605/ip67-ip68-rating-a-brief-guide) and minimum 1 now I have to [query](https://www.mindstick.com/blog/202/sub-query-in-sqlserver) that how many times [users](https://www.mindstick.com/news/2244/issue-preventing-users-from-accessing-facebook-s-social-networking-platforms-has-been-resolved) entered 1, how many times 2, how many times

3, how many times 4 and how many times 5

Thanks in advance.\

## Replies

### Reply by AVADHESH PATEL

Hi Benjamin! \
Try this SQL Query that fulfill your requirement \
SELECT [ARTICLE_RATING],COUNT(Article_Rating) [Total_Count] FROM [COUNT_DETAILS] GROUP BY [Article_Rating]\


---

Original Source: https://www.mindstick.com/forum/589/how-to-get-multiple-count-in-sql

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
