View Full Version : select all columns of each group


Jeff06
01-17-2007, 01:41 PM
SELECT contractid, min(RTRbalance) AS minRB
FROM ACHACT
GROUP BY contractid;

will have two culumn

What if I want to select all columns of ACHACT associated with minEB in each contractid group?
THX.
Jeff

pbaldy
01-17-2007, 02:22 PM
Create a new query with the original table and that query, joined on the 2 appropriate fields. That should return the other data associated with that amount.