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 trialDerek Morse
1,776 PointsI am way off .. help
SELECT price WHERE price = ROUND(1.4 / 1) GROUP BY "price.gbp" FROM products;
6 Answers
Steven Parker
231,072 PointsHere's a few hints:
- the instructions say to return "the product name and price..." but the name is missing here
- they also say "Alias the calculated price to price_gbp." (with an underscore instead of a period)
- you won't need a WHERE clause since you will be returning all rows
- you also won't need a GROUP BY
- recheck the syntax for using the ROUND function
Extra hint: there's an example of a very similar task at the end of the previous video.
Derek Morse
1,776 Pointsthanks
Derek Morse
1,776 PointsSELECT price FROM products WHERE price = ROUND(1.25/1) GROUP BY price_gbp;
still off what piece am i missing.
Steven Parker
231,072 PointsMost of the original hints still need to be applied. And where did the number "1.25" come from?
Derek Morse
1,776 Pointsstill wrong uggg
SELECT name FROM products, price = ROUND(1.4 / 1,2) as "price_gbp";
Steven Parker
231,072 PointsFunctions and aliases belong in the SELECT clause (as explained in your other question). The function syntax itself needs a bit of work, take another look at the example near the end of the last video.
Derek Morse
1,776 PointsSELECT name, ROUND(price / 1,2) as "price_gdp" FROM products;
still wrong
Steven Parker
231,072 PointsReally close now, just 2 issues left:
- the exchange rate given in the instructions is 1.4 instead of 1
- the instructions ask for an alias of "price_gbp" instead of "price_gdp"
Derek Morse
1,776 Pointsi got it now thanks agian
Derek Morse
1,776 PointsDerek Morse
1,776 PointsSELECT name, ROUND(price 1.4/1, 2) AS "price_gbp"; still did not get it trying to make sense.
Steven Parker
231,072 PointsSteven Parker
231,072 PointsThe first term in the ROUND should be a valid math expression, and "price 1.4/1" isn't quite right.