Sql-query example with Ruby on Rails