Re: [SQL] help on select

2011-04-21 Thread Jasen Betts
On 2011-04-20, Saulo VenĂ¢ncio wrote: > --bcaec52e65e9b2f22304a15f3840 > Content-Type: text/plain; charset=ISO-8859-1 > Content-Transfer-Encoding: quoted-printable > > Hi guys, > I need your help. > I have a table called medidas, in this table i have some ocurrences that ha= > s > id_medida(primary

Re: [SQL] help on select

2011-04-21 Thread Charlie
trunc('day', datetime) ), datetimes AS ( SELECT datetime FROM subset GROUP BY datetime HAVING COUNT(*) = (SELECT COUNT(*) FROM pontos) ) SELECT max(datetime) FROM datetimes ; From: saulo.venan...@gmail.com Date: Wed, 20 Apr 2011 17:10:32 -0300 Subject: [SQ

[SQL] help on select

2011-04-20 Thread Saulo VenĂ¢ncio
Hi guys, I need your help. I have a table called medidas, in this table i have some ocurrences that has id_medida(primary key) id_ponto (sec_key) and also datetime field as timestamp. i would like to know from a set of idpontos, e.g. 10,11,23,24 how can i get the most recent date that is common