Results 1 to 2 of 2

Thread: SUM query

  1. #1
    Join Date
    Mar 2004
    Posts
    54

    Unanswered: SUM query

    Hi,

    I have data in my STAT table as follows

    TSTAMP QMGR QNAME ENQ DEQ
    ... .. ...... 59 1
    .. .. ... 59 29
    ... .. ... 59 58

    ... e.t.c

    I want out put as follows

    QMGR QNAME Total Enqueues Total Dequeues
    PQM1 CUST.LOC 1000 1000
    QMBK XML.PS.CS 800 1200

    ... e.t.c

    So i wrote my query like this
    db2 => SELECT QMGR, QNAME, SUM(ENQ), SUM(DEQ) FROM DB2A.STAT GROUP BY QMGR, QNAME

    it seams, it did not give me sum of ENQ, DEQ are correct.

    Please correct me

    Thanks

  2. #2
    Join Date
    Mar 2004
    Posts
    54
    Sorry, i guess it's working correct.
    if you don't agree please let me know the correct one.

    Thanks

Posting Permissions

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