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 trialBarnabas Abraham
595 PointsWorking out Currency Conversion
Struggling with this one quite a bit. I should just be converting the price to GDP from USD, which means dividing by 1.4 in this example, but for some reason I keep being given an error at the end.
SELECT name, ROUND(price / 1.4, 2) AS price_gdp FROM products;
It's not liking that one bit, and I can't figure out why.
It's from the 'Performing Math' quiz on the 'Reporting With SQL' course.
1 Answer
Steven Parker
231,261 PointsYou're gonna love this one...
You aliased your column as price_gdp
, but the challenge is expecting price_gbp
.
Just change the d to a b to fix the typo. A trick I use to avoid this kind of error is cut-and-paste whenever the challenge requires some specific data value or name.
Barnabas Abraham
595 PointsBarnabas Abraham
595 PointsOh my. Thanks for that spot!