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 trialDilwar Rahman
3,750 PointsWe're still in the e-commerce database. This time, from the products table, get the name of every product.
can anyone help me out with this query
2 Answers
Steven Parker
231,269 PointsYou've already passed a harder challenge task. For this one, you just need to select the column named "name" from the table named "products".
Give it a shot, and if you still have trouble, show your complete query code here for more specific help.
harshayraipancholi
Front End Web Development Techdegree Student 16,748 PointsHi Guys,
I'm having a similar problem, what am I missing in my code :
select name from products;
Steven Parker
231,269 PointsInstead of posting a question as an "answer" to another one, you should always start a fresh question and include both your complete code and a link to the course page. The code inclusion and links should be done automatically by using the "Get Help" button in a challenge to create the question.
Dilwar Rahman
3,750 PointsDilwar Rahman
3,750 PointsHi, sorry i am still having trouble not really sure what to do. thanks
Steven Parker
231,269 PointsSteven Parker
231,269 PointsYou already passed task 1 to get to task 2, try doing this task in a similar way to how you did task 1. Give it your best shot and if you still have trouble, show the query you are trying here.
Dilwar Rahman
3,750 PointsDilwar Rahman
3,750 Pointsalright the answer i got was SELECT name AS "Product Name", description AS "Product Description" FROM products; but this was incorrect and i tried many variations but still cannot get this
Steven Parker
231,269 PointsSteven Parker
231,269 PointsYou're working too hard, and getting more data than the instructions ask for. Remember, the task here is "from the products table, get the name of every product".
So you don't need the description at all, and you don' t need a column alias.
Dilwar Rahman
3,750 PointsDilwar Rahman
3,750 PointsHi, I have also tried SELECT Product_name From products table; and many like this but don't seem to get any luck.
Steven Parker
231,269 PointsSteven Parker
231,269 PointsThere's no "Product_name" column in the "products" table. The column that the instructions ask you to select is "name", And when you identify a table, you use only it's name without the word "table".
I'll bet you can get it now.
Dilwar Rahman
3,750 PointsDilwar Rahman
3,750 PointsOh ok so would it be SELECT name FROM Product
Steven Parker
231,269 PointsSteven Parker
231,269 PointsYou're very close! But the name of the table is "products" (with an "s").
Dilwar Rahman
3,750 PointsDilwar Rahman
3,750 PointsThanks for your help Steven.