Convert SQL query to Rails Active Record query
- or -
Post a project like this2898
$10
- Posted:
- Proposals: 2
- Remote
- #1127742
- Awarded
Description
Experience Level: Intermediate
General information for the website: Ruby data base model...
Description of requirements/features: Convert the following sql code in Rails Activerecord query, using the model and the data that I attached.
SELECT games.id, games.teams_name, games.game_date, games.game_time, games.status,game_teams.id,game_teams.home,game_teams.team_id,game_teams.game_id,teams.id,
teams.name,teams.logo,teams.cod_team,teams.site,teams.stadium,teams.league_id,leagues.id,
leagues.name,leagues.status,leagues.sport_id,sports.id,sports.name,sports.status,sports.position
FROM games, game_teams,teams, leagues, sports
where games.status = 'R' and
game_teams.game_id = games.id and
game_teams.team_id = teams.id and
teams.league_id = leagues.id and
leagues.sport_id = sports.id
I don't want you insert the sql code in the ruby code, I want the code could be used independently of database manager.
the result that I want get the array in the file Result.xlsx
Specific technologies required: ruby, rails
Extra notes:
Description of requirements/features: Convert the following sql code in Rails Activerecord query, using the model and the data that I attached.
SELECT games.id, games.teams_name, games.game_date, games.game_time, games.status,game_teams.id,game_teams.home,game_teams.team_id,game_teams.game_id,teams.id,
teams.name,teams.logo,teams.cod_team,teams.site,teams.stadium,teams.league_id,leagues.id,
leagues.name,leagues.status,leagues.sport_id,sports.id,sports.name,sports.status,sports.position
FROM games, game_teams,teams, leagues, sports
where games.status = 'R' and
game_teams.game_id = games.id and
game_teams.team_id = teams.id and
teams.league_id = leagues.id and
leagues.sport_id = sports.id
I don't want you insert the sql code in the ruby code, I want the code could be used independently of database manager.
the result that I want get the array in the file Result.xlsx
Specific technologies required: ruby, rails
Extra notes:
Gustavo C.
100% (1)Projects Completed
2
Freelancers worked with
2
Projects awarded
40%
Last project
25 Apr 2016
Venezuela
New Proposal
Login to your account and send a proposal now to get this project.
Log inClarification Board Ask a Question
-
There are no clarification messages.
We collect cookies to enable the proper functioning and security of our website, and to enhance your experience. By clicking on 'Accept All Cookies', you consent to the use of these cookies. You can change your 'Cookies Settings' at any time. For more information, please read ourCookie Policy
Cookie Settings
Accept All Cookies