Re: [SQL] Count and list only where count is bigger than 1

2006-09-19 Thread A. Kretschmer
am Tue, dem 19.09.2006, um 12:04:55 -0300 mailte Ezequias Rodrigues da Rocha folgendes: > Hi list, > > It is possible to make a count select and only display where count column is > bigger than 1 ? > > My SQL is like this > > SELECT distinct cli.bairro, COUNT( * ) as qtd > FROM base.cliente cl

Re: [SQL] Count and list only where count is bigger than 1

2006-09-19 Thread bnichols
> Hi list, > > It is possible to make a count select and only display where count column > is > bigger than 1 ? > > My SQL is like this > > SELECT distinct cli.bairro, COUNT( * ) as qtd > FROM base.cliente cli > GROUP BY cli.cidade, cli.bairro > ORDER BY 2 > > I noticed that I cannot use "where qtd

Re: [SQL] Count and list only where count is bigger than 1

2006-09-19 Thread Mezei Zoltán
Ezequias Rodrigues da Rocha wrote: SELECT distinct cli.bairro, COUNT( * ) as qtd FROM base.cliente cli GROUP BY cli.cidade, cli.bairro ORDER BY 2 I noticed that I cannot use "where qtd > 1" ok ? What to do ? Google/read tutorial for HAVING. E.g. SELECT distinct cli.bairro, COUNT( * )

[SQL] Count and list only where count is bigger than 1

2006-09-19 Thread Ezequias Rodrigues da Rocha
Hi list,It is possible to make a count select and only display where count column is bigger than 1 ?My SQL is like thisSELECT distinct cli.bairro, COUNT( * ) as qtdFROM base.cliente cliGROUP BY cli.cidade, cli.bairroORDER BY 2I noticed that I cannot use "where qtd > 1" ok ?What to do ?Regards ...-