Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> SQL - How to do this group by query
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
![]() |
![]() |