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 trialTommy Gebru
30,164 PointsChallenge Task 4 of 4 Bummer: SQL Error: near "SELECT": syntax error
This is the last challenge task 4 of 4, I couldnt get to an answer or even get a different error message for a while, so I thought to share it here with the community
SELECT *
FROM Sale
INNER JOIN Customer
(SELECT CustomerID
FROM Customer
WHERE Gender = 'F'
) AS "isFemale"
ON Sale.CustomerID = isFemale.CustomerID;
2 Answers
Gabriel Plackey
11,064 PointsOkay, making progress. With your inner join, you don’t need the table name “customer”. You’re joining a sub query, not a table. So it would be inner join (subquery) as alias on whatever. I think that should do it. But let me know.
Gabriel Plackey
11,064 PointsWhat is you current answer to the challenge? Going blindly on this but based on your error and what I believe the correct answer is, you may need to alias your query join, as something like 'c' then do c.customerID
Tommy Gebru
30,164 PointsI went ahead and shared my code above in the description. I created an ALIAS and provided it as the JOIN criteria at the end of the code
BTW: I got a new error message so treat this as a new question too
Tommy Gebru
30,164 PointsTommy Gebru
30,164 PointsOh wow that did it - i removed the table name