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 trialRobert Keene
5,332 PointsExchange rate incorrect calculation
SELECT name, price, ROUND(price/1.4,2) AS price_gdp FROM products;
Above is my code. I'm fairly certain the code is correct and that the question calls for the price (in DB as USD) to be divided by 1.4 and return the price in GBP, according to the conversion rate provided. What am i doing wrong? I first tried to perform the code with a multiplication to get the conversion but this was rejected, a division is only accepted for the exercise.
1 Answer
Steven Parker
231,248 PointsThe calculation itself is fine. But the challenge asks you to "Write a query that returns the product name and price in Pounds Sterling (GBP).",. The original "price" in dollars is not part of the query requirement.
Also, the challenge instructions say to "Alias the calculated price to price_gbp." But your alias name is "price_gdp" (with a "d" instead of a "b").