Results 1 to 2 of 2
  1. #1
    wpryan is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Apr 2010
    Location
    Orlando, FL
    Posts
    5

    Query to summarize data by month


    Hi All,
    I am maintaining a financial database, and would like to make a year-end summary. Data in the table is TransactionDate, TransactionCategory,TransactionType (Income or Expense) and TransactionTotal. I'd like to sum the transaction totals by month. Do I have to make 12 separate queries, and then include those 12 in a new query, or is there a more direct way to do it?

  2. #2
    CJ_London is offline VIP
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,430
    use a group by query and group on month or year-month if your data is for more than one year

    Code:
    SELECT format(transactiondate,"yyyymm") As TransactionMonth, sum(Transactiontotal) as MonthTotal
    FROM myTable
    GROUP BY  format(transactiondate,"yyyymm")
    or

    Code:
    SELECT month(transactiondate) as TransactionMonth, sum(Transactiontotal) as MonthTotal
    FROM myTable
    GROUP BY month(transactiondate)

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Need to summarize data but not sure how...
    By djlabreche in forum Queries
    Replies: 4
    Last Post: 07-08-2014, 08:17 AM
  2. Query help to summarize data by work week
    By saseymour in forum Queries
    Replies: 4
    Last Post: 07-18-2013, 07:29 AM
  3. Replies: 2
    Last Post: 11-04-2012, 02:08 PM
  4. Replies: 8
    Last Post: 09-26-2012, 01:51 PM
  5. query to summarize top ranking data
    By CMR in forum Queries
    Replies: 1
    Last Post: 09-17-2012, 02:08 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums