Write the code of NotQuery