Group by

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

I have limited experience with Access and need assistance.

I have an shipment table that includes origin zip code, destination zip
code, and ship date. I need to group all shipments that have the same ship
date and same origin-destination zip codes. I need to also know how many
shipments are grouped together.

Thanks
 
SELECT Shipments.ShipDate, OrigZip & " - " & DestZip AS FromTo, Count(OrigZip
& DestZip) AS ShipCount
FROM Shipments
GROUP BY Shipments.ShipDate, OrigZip & " - " & DestZip;

You will need to change the names to match your table and field names.
Copy the code into a text editor, make the appropriate changes.
Create a New Query.
Switch to SQL view.
Paste the code into it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Too Many Parameter Prompts 1
Select min value 1
Empty fields in query 1
Append Invoice 22
Query 2
Consolidation 1
Need help with a complex data set 12
Match Mutliple Columns 4

Back
Top