Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2010

    Unanswered: Query question Convert dates to Month and Sum per Item

    I have multiple items with different dates:
    Item Date Sold
    Item1 09/09/2010 5
    Item1 10/09/2010 10
    Item1 11/09/2010 15
    Item2 09/09/2010 15

    What I would like to get is the following result
    Item Month Sold
    Item1 Sep 30
    Item2 Sep 15

    How should the query look like,

    Last edited by YannickSites; 10-27-10 at 04:22.

  2. #2
    Join Date
    Jan 2004
    Croatia, Europe
    Provided Answers: 5
    Select only month from a date column (use TO_CHAR function to do that; check available format models). Apply SUM function on a SOLD column. GROUP BY everything that isn't aggregated.

    Once you study the documentation, you should be able to write a query. If it still doesn't work, come back, show us what you did and explain what went wrong.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts