order count

G

Guest

I want to make a query that counts the number of orders I have in my database
from each company. I know how to add all of the monetary values of those
orders together in a query, but I do not know how to find out how many orders
there are total. thanks
 
G

Guest

Use the count in a group by query

SELECT MyTable.company, Count(MyTable.orders) AS CountOfOrders
FROM MyTable
GROUP BY MyTable.company
 

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

Top