SQL and Ruby style consolidation

No functional changes here.