SQLTeam.com | Weblogs | Forums

SQL noob - Khan Academy stuck on a question


#1

Hi all,

I've been looking into SQL for the past few days and I've been following a few online tutorials as I literally have no programming knowledge or experience at all. I've been following the Khan's Academy tutorial and all was going well until I hit the Gradebook Challenge question, linked below.

I've had a complete mental block. Any ideas as to what commands I should be using at this point? Obviously I need to round up the decimal to a percent via multiplying by 100 but what is the actual SQL formula for this? Any info would be much appreciated. Thanks for reading.


#2

Study the following query and if it doesn't make sense when you compare it to the material on that link, post back.

 SELECT  Name
        ,Number_Grade
        ,ROUND(Fraction_Completed * 100,1) AS Percent_Completed
   FROM student_grades
;

Also and to be very honest, since you only have 1 post and posted a whole bloody description for the site (unless this new site did that automatically), this smells really bad like some clever attempt to advertise the site without anyone actually calling it SPAM and flagging it as such. If it wasn't related to SQL, I would have flagged it without a read.


#3

@JeffModen, it's not spam. I clicked the edit post option on the original post and saw that it's just a link. So the new forum software must've added the rest.


#4

Thanks, Tara.


#5

I got stuck on the same question. It has been the only question so far in the courses on programming that I have taken at this website so I really appreciate the response. I found this answer and, as a result this useful forum, through a google search. ...although I had to remove the 1 to get the answer correct.