Getting an aggregate (here: min) for a group of values Example table:  

ID   | value A | value B  
----------------------  
1    |    abc  |   3  
1    |    def  |   5  
1    |    ghi  |   1  
2    |    cba  |   9  
2    |    fed  |   4  


I want the rows from within any 'ID-group' that has it's minimum within that group in value B.

Wanted result:  

ID | value A | value B  
----------------------  
1  |    ghi  |   1  
2  |    fed  |   4  


Anything I tried with group by always fails because of that 'value B'-column and its varying values because I do not want to / cannot aggregate them.
Postgres has distinct on that does just what you are looking for:

select distinct on (id) id, value_a, value_b
from t
order by id, value_b;


SQLFiddle here

You haven't specified what you would like to see when the are multiple values of value_b for an id though.