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 trial

Databases

I don't understand what's wrong with my query.

select * from sale s inner join (select customerid from customer where gender = "F") c on s.customerid = c.customerid

2 Answers

Ken Alger
STAFF
Ken Alger
Treehouse Teacher

Jason;

Without knowing exactly what you are trying to accomplish, and assuming that your above code is what was put into a Treehouse challenge, there is a space in sale s which may not be intentional?

Posting a link to the challenge would be helpful here. ;-)

Happy coding,
Ken

This is the challenge: Challenge Task 4 of 4 In a car database there is a Sale table with columns, SaleID, CarID, CustomerID, LocationID, SalesRepID, SaleAmount and SaleDate and a Customer table with columns, CustomerID, FirstName, LastName, Gender and SSN.

Use a subquery as a derived table to show all sales to female ('F') customers. Select all columns from the Sale table only.

Type in your command below.