Subject Re: [IBO] max (count *) .... please help me :)
Author Tomeu Vidal
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