Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> SQL - How to do this group by query

SQL - How to do this group by query

From: <suisum_at_ecn.ab.ca>
Date: 27 Jun 99 23:42:02 GMT
Message-ID: <3776b6ca.0@ecn.ab.ca>


When I run the following SQL, I got an error:

> select service_account_id

  2 from service_consumptions
  3 where max (read_date) < sysdate - 30   4 group by service_account_id
  5 order by service_account_id;
where max (read_date) < sysdate - 30

      *
ERROR at line 3:
ORA-00934: group function is not allowed here

I only want to get those items which read_date is less than 30 days to the system date.

--
Best regards, Received on Sun Jun 27 1999 - 18:42:02 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US