Brain cramp - pull counts of orders closed

  • Thread starter Thread starter RA
  • Start date Start date
R

RA

I have orders that have sub orders, each order/suborder is entered
independently into the database. I need to be able to count the number of
orders closed, not sub orders.

Example:

Order 1 has two sub-orders, A & B. A is closed but not B. Order 2 has three
sub-orders and all are closed.

I want to run a query that counts the number of "Total" closed orders. In
my example I'd get the result of 1 (order 2), since order 1 still has a
sub-order open. Of course I have dozens of orders with many suborders.
 
You fail to tell a big part of your story. How is the data stored?
Are identification of orders and suborders in separate fields or combined in
a single field?
How do you indicate if an order/suborder is closed?
 
Back
Top