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

General Discussion

Cant figure this out, tried many other ways already please help

Challenge Task 3 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 along with IN to list all sales to female customers. (Gender = 'F') Select all columns.

Steven Parker
Steven Parker
231,271 Points

To facilitate a rapid and accurate answer:

  • select the correct category for the course (probably "Databases" here)
  • show the entire query you were trying
  • provide a link to the course page you are working with

2 Answers

SQL Course Querying Rational Databases

Steven Parker
Steven Parker
231,271 Points

That's good, but a link to the page's URL would be better. And also show the query that you were trying that was giving you trouble.

Plus, remember to edit the question to set the same category as the course.

Asim Qureshi
Asim Qureshi
5,056 Points

its = SELECT * FROM Sale WHERE CustomerID IN (SELECT CustomerID FROM Customer WHERE Gender = 'F')