Updated the assignment query