Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.


Elizabeth Ekhuemelo
Elizabeth Ekhuemelo
677 Points

What have I done wrong?

I have been trying to write the query/code to find out the customer details for first_name ad second_name.

Steven Parker
Steven Parker
220,365 Points

Show your code here and we can take a look. Please also post a link the course page you are working with.

2 Answers

It will be helpful if you paste the link to the problem or a more detail explanation but I will try and answer this ,hopefully it will help. lets assume the table name is USERS, and have four columns in it, namely id, first_name, last_name and phone.

to get the first_name and last_name of all the users in the USERS table, you first use the SELECT keyword which indicate that its to read from a table/view . Then the columns you want to output each separated by a comma (,) . Then use the FROM keyword and specify the table name (USERS). i.e

SELECT first_name, last_name FROM USERS;

Prem Yadav
Prem Yadav
7,346 Points

SELECT first_name ,last_name FROM (table name);