Format db query for readability.