← Back to INSERT, UPDATE & DELETE
Question 77
Ten Percent More for Third-Year Courses
Ten Percent More for Third-Year Courses
Third-year courses cost more from next term. Raisefeeby ten percent for every course whoselevelis 300: multiply the current fee by 1.1 andROUNDthe result to 2 decimals so the stored values stay clean. Four rows change (ids 4 and 14 go from 820 to 902, id 10 from 780 to 858 and id 12 from 900 to 990); every other course keeps its fee.
Expected result:
courses after your statements: 14 rows +----+---------+-----------------------------+---------------+---------------+---------+-------+-----------+-------+-------------+-----+ | id | code | title | department_id | instructor_id | credits | level | max_seats | room | semester | fee | +----+---------+-----------------------------+---------------+---------------+---------+-------+-----------+-------+-------------+-----+ | 1 | CS101 | Introduction to Programming | 1 | 1 | 3 | 100 | 60 | T-100 | Fall 2025 | 650 | | 2 | CS201 | Data Structures | 1 | 2 | 3 | 200 | 40 | T-102 | Winter 2026 | 650 | | 3 | CS230 | Databases | 1 | 3 | 3 | 200 | 35 | T-104 | Winter 2026 | 700 | | 4 | CS310 | Operating Systems | 1 | 1 | 4 | 300 | 30 | T-106 | Fall 2025 | 902 | | 5 | MATH110 | Calculus I | 2 | 4 | 4 | 100 | 80 | G-001 | Fall 2025 | 600 | +----+---------+-----------------------------+---------------+---------------+---------+-------+-----------+-------+-------------+-----+ (showing 5 of 14 rows)
Hints3 available
Sign in to use hintsTopics:
INSERT, UPDATE & DELETE
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Ctrl+Space to expand shortcuts (sel, ins, desc)
Results
Run your SQL to see every statement's output here, then how it compares with the expected answer.
Not sure what is in a table? SHOW TABLES lists them and DESCRIBE students shows the columns — or open the database browser on the left.