2011/11/29 Marcone <marconepe...@gmail.com> > > > Acho que uma coisa bem simples pode resolver: > > select min(data) as 'data', mem > from tabela > group by mem > order by 1; > > Nao funcionou, Os registros abaixo nao apareceram no resultado: data | mem
------------------------------+------ 2011-11-21 15:33:00 | 1065 2011-11-21 15:34:00 | 1049 veja o resultado moi=> select min(data) as data, mem from usodememoria group by mem order by 1; data | mem ---------------------+------ 2011-11-21 15:21:00 | 1038 2011-11-21 15:22:00 | 1049 2011-11-21 15:25:00 | 1052 2011-11-21 15:26:00 | 1054 2011-11-21 15:29:00 | 1065 2011-11-21 15:30:00 | 1080 2011-11-21 15:32:00 | 1073 (7 rows) > -- > Marcone Peres - DBA > http://www.linkedin.com/in/marconeperes > @marconeperes > (61) 8146-0028 > _______________________________________________ > pgbr-geral mailing list > pgbr-geral@listas.postgresql.org.br > https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral > -- Moisés P. Sena (Analista e desenvolvedor de sistemas WEB e mobile) http://www.moisespsena.com http://linux.moisespsena.com
_______________________________________________ pgbr-geral mailing list pgbr-geral@listas.postgresql.org.br https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral