Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialClaire Uzenski
1,026 PointsNeed more help with SQL basics, having trouble with more of the equations
It has to do with numbers and more equations
Claire Uzenski
1,026 PointsIts a sports team database that involves home score, away team, away score
Sean T. Unwin
28,690 PointsIs it the wording of the Challenge you are having trouble understanding what the goal is?
8 Answers
Sean T. Unwin
28,690 PointsTask 1 is asking to get the away_team
named 'Hessle' as well as where they scored, away_score
, greater than 18
points.
Claire Uzenski
1,026 PointsI tried typing out what I though was the right equation, but it was wrong
Sean T. Unwin
28,690 PointsCan you post what you attempted, please?
Claire Uzenski
1,026 PointsI'm doing beginning SQL basics, the view challenge button should be here
Sean T. Unwin
28,690 PointsI understand what the Challenge is. I don't just want to give you the answer. I want to see what you have tried so we can work through it together.
Claire Uzenski
1,026 PointsI've watched the video many times, I tried to to type how the equation should go, but it's always wrong, I either haven't included everything or There's something wrong with it, it's really frustrating.
Sean T. Unwin
28,690 PointsHence the request to share what you have tried so we don't have to flat out give you the answer. ;-)
Start out with, SELECT * FROM results WHERE
, and then use the hints I gave in a previous answer.
Claire Uzenski
1,026 PointsSELECT "Hessle" FROM results WHERE id = away_team AND away_score > 18;
Thanks for your help. I've tried many attempts. This is the last one I tried. What do you think ?
Sean T. Unwin
28,690 PointsThank you for adding your attempt!
You're not too far off, really.
After the SELECT
we always say which fields, or columns as they are typically called, we want returned. Using an asterisk (*
) we mean to grab every column in the table.
What the Challenge is looking for is:
SELECT * FROM results WHERE away_team = 'Hessle' AND away_score > 18
Claire Uzenski
1,026 PointsThank you for the help, now I'm trying to figure out the second part of the task and this is what I've got so far SELECT * FROM users WHERE last_name = "Hinkley" OR "Pettit"
Claire Uzenski
1,026 PointsI can't figure out what I'm leaving out or if I'm wording it wrong
Sean T. Unwin
28,690 Points... WHERE last_name = 'Hinkley' OR last_name = 'Pettit'
Try to use single quotes as some database engines, such as Microsoft SQL Server, don't like the use of double quotes for String designation.
Claire Uzenski
1,026 PointsThank you, it helped
Sean T. Unwin
28,690 PointsYou're welcome. Happy coding! :-)
Sean T. Unwin
28,690 PointsSean T. Unwin
28,690 PointsCan you show us what you have tried or explain what you're having trouble with?