RE: Select count(*) problem
Posted in 2000
Try :
select count(*) , column_b
from table_x
wherecolumn_a=12345
group by column_b
having column_b > 200
-----Oorspronkelijk bericht-----
Van: darkemperor_uk [mailto:johnsimpson46@johnsimpson46.fsnet.co.uk]
Verzonden: maandag 22 mei 2000 13:55
Aan: informix-list@iiug.org
Onderwerp: Select count(*) problem
I use informix online on HP-UX and am having problems with a select.
The following query:
select count(*)
from table_x
wherecolumn_a=12345
group by column_b
returns 11 rows with the following output:
(count(*))
204
172
202
203
203
202
242
202
204
201
196
What I want is a sub-query that returns a count of the rows where the count
is greater than 200. So the final output here would be 9.
I am not interested in an individual count of the rows grouped by column_b -
just a final output of the number of column_b grouped rows > 200.
Don't know if that makes sense.
Any help would be greatfully received.