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 Reporting with SQL Working with Text Practice Session

Jay Narain
Jay Narain
2,311 Points

In the SQL playground there is the assignment "review attribution". but we do not know how to change the column order?

I do not know which function/keyword nessecary to change the column order, which is being asked in the assignment of "review attribution" if i understand it correctly

4 Answers

Steven Parker
Steven Parker
231,268 Points

The column display order is simply determined by the order that you name them in the SELECT clause.

But the example shown makes me think the objective is to join the review and username using concatenation.

Rahul Kasam
Rahul Kasam
3,080 Points

Add the username after the review. e.g. "That was a really cool movie - chalkers"

SELECT || """ || review ||"-"|| username ||""" FROM reviews; Is this correct? Need help! to correct this!

SELECT review||"That was a really cool movie - chalkers" FROM reviews;

Takyi Akwah
Takyi Akwah
2,977 Points

SELECT review || " - " || username AS "User Review" FROM reviews;