Subquery SUM() by Date

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

Guest

Dear All!

I have a list of products (PartNo), Order Quantity (OrdQty) and Date ordered
(OrdDate), and need to produce a query which produces the following:

PartNo | Qty Ordered 2003 | Qty Ordered 2004

I already have simple queries written which show parts ordered 2003 only,
parts ordered 2004 only and parts ordered 2003 & 2004, and I have queries
written that will total the quants. of all parts ordered, and the quants. of
parts ordered only in 2003 or 2004.

The problem I am having is outputting two columns from a single input - how
would I proceed?

Thanks! This newsgroup has been invaluable, I've learnt so much in the past
week!

Regards,

Matt
 
Matt,

If I understand you correct, you should be able to do what you need.
You already have the Qty Ordered 2003 in one query and Qty Ordered 2004 in
another. All you have to do is to create a query to join this two queries by
the PartNo. Then you should have it solved.

Hope this helps.
 
Back
Top