Update query.cpp