[suse-oracle] Can oracle group by more then one column?

From: reddwarf (reddwarf91@yahoo.com)
Date: Sat Oct 27 2001 - 09:41:45 PDT

  • Next message: Kevin Heil: "Re: [suse-oracle] Can oracle group by more then one column?"

    Message-ID: <20011027164145.26206.qmail@web13501.mail.yahoo.com>
    Date: Sat, 27 Oct 2001 09:41:45 -0700 (PDT)
    From: reddwarf <reddwarf91@yahoo.com>
    Subject: [suse-oracle] Can oracle group by more then one column?
    

    This seems like a stupid question to me because every
    database i have worked with can do this but its not
    working in oracle.

    I have a table called exam_result and this is my query

    select class_id, date_taken, count(er_id) cntexams
    from exam_result
    where exam_type = 8
    group by class_id, date_taken;

          class_id date_taken cntexams

          7131 23-MAR-00 1
          7131 23-MAR-00 1

    Why is this not aggregating?
    I should be getting
           7131 23-MAR-00 2
    It works if i only use class_id but when i use 2
    columns it no longer does a count.

    Any suggestions would be greatly appreciated as i have

    been killing myself over this.

    -Kyle

    __________________________________________________
    Do You Yahoo!?
    Make a great connection at Yahoo! Personals.
    http://personals.yahoo.com

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: suse-oracle-unsubscribe@suse.com
    For additional commands, e-mail: suse-oracle-help@suse.com



    This archive was generated by hypermail 2.1.0 : Sat Oct 27 2001 - 09:40:57 PDT