continuous webjob, sql to get notes count