For Example:
for(Contact con : [Select Id,Salary__c From Contact Where AccountId = :accId Limit 100]){
System.debug('Check min'+con.Salary__c);
}
How to loop though the results and retrieve the minimum salary without changing my SOQL query?