excute sql query in rails code example Example: rails execute sql results = ActiveRecord::Base.connection.exec_query(sql)