db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From noel_fuen...@freddiemac.com
Subject Correlated sub query in torque
Date Fri, 21 May 2004 13:17:05 GMT
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


Mime
View raw message