Skip site navigation (1) Skip section navigation (2)

Re: Filtro de Consultas

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Mario Gonzalez <gonzalemario(at)gmail(dot)com>
Cc: Postgres Español <pgsql-es-ayuda(at)postgresql(dot)org>
Subject: Re: Filtro de Consultas
Date: 2006-06-24 00:13:10
Message-ID: 20060624001310.GB11847@alvh.no-ip.org (view raw or flat)
Thread:
Lists: pgsql-es-ayuda
Mario Gonzalez escribió:

>  con eso, como puedo hacer para devolver los que solo estan una vez
> en la tabla? O sea asi
> a | b
> ---+---
> 1 | 2
> 5 | 6

alvherre=# select * from uno where a in (select a  from uno group by a having count(*) = 1);
 a | b 
---+---
 1 | 2
 5 | 6
(2 filas)


-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

In response to

Responses

pgsql-es-ayuda by date

Next:From: Mario GonzalezDate: 2006-06-24 02:52:07
Subject: Re: Filtro de Consultas
Previous:From: Alex ConchaDate: 2006-06-23 23:43:55
Subject: Re: Filtro de Consultas

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group