Re: Count and list only where count is bigger than 1 - Mailing list pgsql-sql

From Mezei Zoltán
Subject Re: Count and list only where count is bigger than 1
Date
Msg-id 4510082F.203@telefor.hu
Whole thread Raw
In response to Count and list only where count is bigger than 1  ("Ezequias Rodrigues da Rocha" <ezequias.rocha@gmail.com>)
List pgsql-sql
Ezequias Rodrigues da Rocha wrote: <blockquote cite="mid55c095e90609190804w1eaac2aanc660020995d3710a@mail.gmail.com"
type="cite">SELECTdistinct cli.bairro, COUNT( * ) as qtd<br /> FROM base.cliente cli<br /> GROUP BY cli.cidade,
cli.bairro<br/> ORDER BY 2<br /><br /><span style="font-weight: bold;">I noticed that I cannot use "where qtd > 1"
ok?</span><br /><br /> What to do ?<br /></blockquote> Google/read tutorial for HAVING. E.g.<br /><br /> SELECT
distinctcli.bairro, COUNT( * ) as qtd<br /> FROM base.cliente cli<br /> GROUP BY cli.cidade, cli.bairro<br /> HAVING
COUNT(*)> 1<br /><br /> Zizi<br /> 

pgsql-sql by date:

Previous
From: "Ezequias Rodrigues da Rocha"
Date:
Subject: Count and list only where count is bigger than 1
Next
From: bnichols@ca.afilias.info
Date:
Subject: Re: Count and list only where count is bigger than 1