SQL count question
Posted in 1997
Matt Brickley — — source: Informix-list mailing list archive (1991-1998)
On SE 5.01, SCO Unix 3.2v4.2
I am trying to use the aggregate count(*) to select rows where
there are more than on occurrance.
The Informix guide to SQL on pg 7-377 shows this statement:
select fname,count(*) from customer
group by fname
where count(*) > 1
This format gave me a syntax error
When I put the where before the group by like this:
select fname,count(*) from customer
where count(*) > 1
group by fname
I get a 595 - Bad use of aggregate in this context
How do I do it?
TIA,
Matt Brickley