Subject | Re: [IBO] max (count *) .... please help me :) |
---|---|
Author | computacionbariloche |
Post date | 2006-08-11T13:30:57Z |
Thanks Tomeu !
MAy I know only the max of count (*) ?
MAy I know only the max of count (*) ?
--- In IBObjects@yahoogroups.com, Tomeu Vidal <tomeu@...> wrote:
>
> computacionbariloche escribió:
> > Hello people,
> > I have a table "tbl" with fields ID, f1, f2.
> > I want to know if there are repeated rows for each value of f1,
with
> > a condition for f2.
> >
> > I have:
> > select f1, count (*) as quantity from tbl
> > where f2="myCondition"
> > group by f1
> >
> >
> > There I have all values, but I only want to know if in this query
any
> > row has a value of quantity > 1
> >
>
> select f1, count (*) as quantity
> from tbl
> where f2="myCondition"
> group by f1
> having count(*)>1
>
> --
> Tomeu
>