Convert SQL strings to use Arel