db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bogdan Vatkov" <bvat...@globaltech-bg.com>
Subject Re: Correlated sub query in torque
Date Fri, 21 May 2004 13:21:07 GMT
do you have a suggestion of the SQL that would do that ?

regards,
bogdan
----- Original Message -----
From: <noel_fuentes@freddiemac.com>
To: <torque-user@db.apache.org>
Sent: Friday, May 21, 2004 4:17 PM
Subject: Correlated sub query in torque


> does anybody know how to construct a criteria  to retrieve the record with
> the highest sequence number from a sub group of records (nbr column) using
> the data and table structure below?
>
> id    seq   nbr   amount
> 12    1     500   500
> 13    2     500   400
> 14    3     500   450
> 15    1     501   400
> 16    1     502   200
> 17    1     503   350
> 18    1     504   325
> 19    2     504   325
>
> i would like to be able to retrieve id 14, 15, 16, 17, and 19 only.
>
> thanks,
> nf
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


Mime
View raw message