Solved

MySql count question...

Posted on 2014-11-19
2
208 Views
Last Modified: 2014-11-23
Hi, I have a table as follows:

order #      order_status
1      Submit
2      Cancelled
3      In Progress
4      In Progress
5      In Progress
6      In Progress
7      Cancelled
8      Cancelled
9      Submit
10      Submit

The output I am looking for with a query is as follows:

order_type      Count
Submit              3
Cancelled      3
In Progress      4

Is this possible with just a mysql query?

Thank you,
A
0
Comment
Question by:aej1973
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 58

Accepted Solution

by:
Gary earned 500 total points
ID: 40453176
SELECT count(order_status) as count, order_status from table 
GROUP BY order_status

Open in new window

0
 

Author Closing Comment

by:aej1973
ID: 40461345
Thank you.
0

Featured Post

How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How to import sql database into mysql workbench 18 56
FrontEnd tools to create web database application 7 117
Survey branching tutorial 11 78
phpmyadmin memory error 55 96
Foreword In the years since this article was written, numerous hacking attacks have targeted password-protected web sites.  The storage of client passwords has become a subject of much discussion, some of it useful and some of it misguided.  Of cou…
Containers like Docker and Rocket are getting more popular every day. In my conversations with customers, they consistently ask what containers are and how they can use them in their environment. If you’re as curious as most people, read on. . .
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question