Challenge: Updating Page Counts
The library discovered that some books in their database have incorrect page counts due to a data entry error. Specifically, for books published before the year 2000
, the page count was mistakenly recorded 10 pages fewer than the actual number of pages.
Swipe to start coding
Your task is to fix this error by updating the pages
column in the books
table. Increase the page count by 10
for all books where published before the year 2000
.
You can reference a column value in an UPDATE
statement like this:
UPDATE table_name
SET column_name = column_name + value
WHERE condition;
Solution
Thanks for your feedback!
single
Ask AI
Ask AI
Ask anything or try one of the suggested questions to begin our chat
Summarize this chapter
Explain the code in file
Explain why file doesn't solve the task
Awesome!
Completion rate improved to 1.72
Challenge: Updating Page Counts
Swipe to show menu
The library discovered that some books in their database have incorrect page counts due to a data entry error. Specifically, for books published before the year 2000
, the page count was mistakenly recorded 10 pages fewer than the actual number of pages.
Swipe to start coding
Your task is to fix this error by updating the pages
column in the books
table. Increase the page count by 10
for all books where published before the year 2000
.
You can reference a column value in an UPDATE
statement like this:
UPDATE table_name
SET column_name = column_name + value
WHERE condition;
Solution
Thanks for your feedback!
Awesome!
Completion rate improved to 1.72single