SQL Challenge: Gradebook
For the first step in the challenge, I've achieved the correct result but it won't let me proceed. What am I doing wrong?
The prompt is select all of the rows, and display the name
, number_grade
, and percent_completed
, which you can compute by multiplying and rounding the fraction_completed
column.
This is the code I came up with (at the end):
CREATE TABLE student_grades (
id INTEGER PRIMARY KEY AUTOINCREMENT,
name TEXT,
number_grade INTEGER,
fraction_completed REAL);
INSERT INTO student_grades (name, number_grade, fraction_completed)
VALUES ("Winston", 90, 0.805);
INSERT INTO student_grades (name, number_grade, fraction_completed)
VALUES ("Winnefer", 95, 0.901);
INSERT INTO student_grades (name, number_grade, fraction_completed)
VALUES ("Winsteen", 85, 0.906);
INSERT INTO student_grades (name, number_grade, fraction_completed)
VALUES ("Wincifer", 66, 0.7054);
INSERT INTO student_grades (name, number_grade, fraction_completed)
VALUES ("Winster", 76, 0.5013);
INSERT INTO student_grades (name, number_grade, fraction_completed)
VALUES ("Winstonia", 82, 0.9045);
SELECT * FROM student_grades;
SELECT name, number_grade,
ROUND (fraction_completed*100) AS percent_completed
FROM student_grades;
I am getting the result that I think they wanted, so what is wrong with it?
Влезте в услугата, за да оставите коментар.