I want to select the row from each group where the value in one column is the lowest for that group.
The following does not work:
select contactID, PhoneID, Phone
from PhoneNumber
where PhoneID= (select min(PhoneID) from PhoneNumber as p where p.contactID = PhoneNumber.contactID)
I have tried this many ways. The above way gives me, "missing right parenthesis", even though there is no missing right parenthesis.