# Regarding a query in Learn Sql

**URL:** <https://discuss.codechef.com/t/regarding-a-query-in-learn-sql/123675>\
**Category:** help\
**Created:** [June 19, 2025, 5:39am UTC](https://discuss.codechef.com/t/regarding-a-query-in-learn-sql/123675 "2025-06-19T05:39:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rishi\_rishu\_16](https://www.codechef.com/sites/all/themes/abessive/images/user_default_thumb.jpg) [@rishi\_rishu\_16](https://discuss.codechef.com/u/rishi_rishu_16)\
**Post date:** [June 19, 2025, 5:39am UTC](https://discuss.codechef.com/t/regarding-a-query-in-learn-sql/123675/1 "2025-06-19T05:39:34Z")

</div>

### Describe your issue

"Hello, I’m encountering an issue with this problem. According to the problem description, `ROLLBACK TO S1` should restore the original salaries of the faculty members. However, when I execute `ROLLBACK TO S1;` followed by `SELECT * FROM Faculty;`, the `salary` column contains `NULL` values for all rows. This indicates that the `S1` savepoint was created _before_(it was mentioned in the previous query) the salary data was populated in the `Faculty` table.

This makes it impossible to complete the subsequent steps of reducing the salary and calculating the average, as these operations require the `salary` column to contain numerical values.

Could you please clarify whether this behavior is intended? If `S1` is indeed supposed to contain the initial salaries, there may be an issue with the problem setup or the database state. If not, the problem description should be updated to reflect the actual behavior of the `ROLLBACK` and provide alternative instructions for obtaining the initial salary data.

Thank you for your time and attention to this matter."

### Screenshot

 ![image](https://s3.amazonaws.com/discourseproduction/original/4X/c/1/f/c1fc8ae6f1795b5148b5db35e931295058330c35.png)

[Task-7 Rolling Back and Updating Salaries in SQL](https://www.codechef.com/learn/course/sql/BEGSQLPR01/problems/SQLPRO2H)

### Additional info
