Solved

Select Count of distinct items

Posted on 2008-10-29
1
161 Views
Last Modified: 2012-05-05
I need a SQL statement.

I have a MS Access Table with a "Status" field (column).

There could be any number of distinct values in the Status field

Example

Trader
Keeper
Loaner
etc.

How can I get the totals of each of these from the status field of the table?

Example:

Trader 20
Keeper 9
Loaner 31
etc

thanks

0
Comment
Question by:geocoins-software
1 Comment
 
LVL 9

Accepted Solution

by:
jamesgu earned 250 total points
ID: 22833690
select status, count(*)
from <table>
group by status
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SQl Query to find x consecutive Nbrs in a Table 30 101
T-SQL Default value in Select? 5 52
query question 12 34
SQL Recursion schedule 13 34
As they say in love and is true in SQL: you can sum some Data some of the time, but you can't always aggregate all Data all the time! Introduction: By the end of this Article it is my intention to bring the meaning and value of the above quote to…
If you find yourself in this situation “I have used SELECT DISTINCT but I’m getting duplicates” then I'm sorry to say you are using the wrong SQL technique as it only does one thing which is: produces whole rows that are unique. If the results you a…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

749 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