deleted datasets need not get checked
SQL query optimization. Now takes 1/4 of the time
AN001 was erroneous by SQL, fix it