Solved

MySql count question...

Posted on 2014-11-19
2
209 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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

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. . .
This post contains step-by-step instructions for setting up alerting in Percona Monitoring and Management (PMM) using Grafana.
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

627 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