Before you keep reading...
Runestone Academy can only continue if we get support from individuals like you. As a student you are well aware of the high cost of textbooks. Our mission is to provide great books to you for free, but we ask that you consider a $10 donation, more if you can or less if $10 is a burden.
Before you keep reading...
Making great stuff takes time and $$. If you appreciate the book you are reading now and want to keep quality materials free for other students please consider a donation to Runestone Academy. We ask that you consider a $10 donation, but if you can give more thats great, if $10 is too much for your budget we would be happy with whatever you can afford as a show of support.
Practice Problems - Write Code
Now, let’s spend 15 minutes to practice what we just learned!
Please do not refer back to the previous page or outside resources.
You can stop working on a problem after you worked
on it for about three minutes without solving it.
Problems
In the grades table:
Please write a SELECT statement to retrieve the student_id, test_name,
and english of all entries whose english is lower than 60 and math is higher than 90.
In the grades table:
A student completed an extra assignment and got some additional points.
Please write an UPDATE statement to change the entry whose student_id is 1, and set their math score to 90 in the final test (test_name column).
In the grades table:
The instructors decided to add some points to all students as one test was too difficult.
Please write an UPDATE statement to change all entries whose test_name is midterm,
and add 10 points to their english score.
Aside from the grades table:
We also have a students table:
Now we want to match the student name to their math grades.
Please write a statement using SELECT and JOIN to: select the test_name and math
from the grades table and name from the students table, where the student_id
in the grades table is the same as the id in the students table.
Aside from the grades table:
We also have a tests table:
Now we want to add the date information to the grades to see when the students took the tests.
Please write a statement using SELECT and JOIN to: select the date and name
from the tests table and student_id from the grades table,
where the test_name in the grades table is the same as the name in the tests table.
What to do next
Click on the following link to go to the post test: Post Test
You have attempted
of
activities on this page