Just looking to see if there\'s an elegant solution to this problem:
Is there a way to loop through the results of a psql query and return a specific result based on the