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 SQL Basics Getting Data from a Database Categorizing Your Output with 'AS'

Nameer Jamal
Nameer Jamal
309 Points

select first_name as "First Name", last_name as "Last Name", phone as " Phone Number" from phone_book;

select first_name as "First Name", last_name as "Last Name", phone as " Phone Number" from phone_book;

Nameer Jamal
Nameer Jamal
309 Points

in the users table we have the columns id, username, password, first_name and last_name.

Find all users with the first name starting with the letter "L". select * from users where first_name like "%L'; Please check the answer

Nameer Jamal
Nameer Jamal
309 Points

Write a query to obtain the first 5 books in the Fantasy genre ordered by the year released. Oldest first. Select all columns. select * from book where order by genre asc limit 3; please correct the answer

1 Answer

Travis Alstrand
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Travis Alstrand
Data Analysis Techdegree Graduate 49,443 Points

Hey there Nameer Jamal ! :wave:

I'm not sure exactly what the issue is, as you haven't provided us with any context here. But for the third step in this challenge, it's probably the space you have before " Phone Number". Since it's inside of the quotation marks, it's going to add that in the alias. These challenges are very specific with what they're looking for in our answers so we always have to be very mindful of what we're providing. :thumbsup:

SELECT first_name AS "First Name", last_name AS "Last Name", phone AS "Phone Number"
FROM phone_book;