Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Access Database Query formula to help with how many times a part was shipped

Posted on 2015-02-09
1
Medium Priority
?
80 Views
Last Modified: 2015-02-12
How do you setup a Access query to help take a list of part numbers with many duplicates and total how many shipments were made.  for example if the part number shows on the list 5 times that part has shipped 5 times, and the report would only show the part name once with 5 shipments.
0
Comment
Question by:cg1975
[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
1 Comment
 
LVL 14

Accepted Solution

by:
ThomasMcA2 earned 2000 total points
ID: 40599245
You need a combination of GROUP BY and COUNT, like this:

SELECT PartNumber, Count(1) as Orders
FROM Orders
WHERE ...
GROUP BY PartNumber

Open in new window


That will give a report like this:

PartNumber         Orders
ABC123               5
CDE234               2
FGH567              10

Open in new window

0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
Instead of error trapping or hard-coding for non-updateable fields when using QODBC, let VBA automatically disable them when forms open. This way, users can view but not change the data. Part 1 explained how to use schema tables to do this. Part 2 h…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

715 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