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 Querying Relational Databases Subqueries Using a Subquery to Create a Temporary Table (Part 1)

Bug when quering with derived tables

Hi

I getting something weird here, when I quering the carid and the modelyear with the derived table, I get The carid rows under "ModelYear", and the modelyear rows Under blank column, and when quering the carid only without the modelyear, I get the carid rows under blank column

Steven Parker
Steven Parker
231,184 Points

Please show the specific code you are using when you see this behavior.

2 Answers

In fact, here's the specific situation with regards to this section of the course.

Image

Steven Parker
Steven Parker
231,184 Points

That's clearly a bug, that last column is obviously "CarID" from the derived table.

You might want to forward this to Support.

I think I know what he means and I have experienced the same problem. While not the same example as above, here's another instance where the column headers are offset incorrectly.

SELECT * FROM Car INNER JOIN Model ON Car.ModelID = Model.ModelID;

The joined table has 3 columns, but the last column has no header. The first column has the header for the second column, the second has the header for the third leaving the third blank.