New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement query I #18
Comments
I've started it (see 38beef4 ), but I'm going to bed for now. After all, the deadline is still far along, and I'm making good progress on these queries. |
Finished in 70b1e86, closing. |
It seems it's computing the data (avg and age) from the coaches instead of the team members. Or did I misunderstood the query we have to solve? |
"of teams of coaches" -> I thought this meant precisely that it was the average of weight/height etc. of the players in the teams managed by (coaches who had more then XXX/YYY career/wins percentage). Don't you think? We could argue either way imho... |
Apparently we agree on that, the SQL query doesn't seem to do that. Since I changed it to use the |
Yeah but still using only the coaches tables how can you find the average weight/height/age of the players of these teams? |
I'd use |
By "you would" you mean "in the final version of the query which is not yet done", correct? |
Indeed. When the average age is above 60, something is wrong :-) |
My average age seemed correct btw, (using to_date(year, 'YYYY') instead of
|
I'm taking the definition "season" to be a bit broader that just for one team one time, but for the whole actual season (year).
I wanted to work on that some more, but it returns 0 rows, I guess because 'coaches' is empty because of triggers. I'll try debugging them now on my side. |
Hypothesis: my user doesn't have the permission to create triggers :D |
Aaand that was it. coaches table is correctly populated now. Finishing up this query |
Sweet! |
The reason why I redid the HTML view:
|
List the average weight, average height and average age, of teams of coaches with more than XXX season career wins and more than YYY win percentage, in each season they coached. (XXX and YYY are parameters. Try with combinations:
{XXX,YYY}={<1000,70%>,<1000,60%>,<1000,50%>,<700,55%>,<700,45%>}
. Sort the result by year in ascending order.The text was updated successfully, but these errors were encountered: