On Jun 24, 7:24 am, Pav <ksulta...@googlemail.com> wrote:
> Hi
>
> I was trying to run an sql statement as following
>
> select column1, count(*) from table1 group by column1 where count
> (column1) > 99;
>
> This seems to be incorrect, and so I was wondering if anyone knew a
> working alternative?

for a group expression you use HAVING not WHERE

so would be more like

select column1, count(*)
from table1
group by column1
having count(*) > 99

I am presuming that you only want the rows where the count is > 99

Rob

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Oracle PL/SQL" group.
To post to this group, send email to Oracle-PLSQL@googlegroups.com
To unsubscribe from this group, send email to
oracle-plsql-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/Oracle-PLSQL?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to